Re: What is VC++ (.net) Express?
"Toby Chips" wrote:
The code consists of a bunch of static libraries all
compiled in Debug
configuration, and then one main program that links those
all in. The
break is in the main application. I see it puts these
vc80.pdb files
in all the Debug directories. One thing that might be
messing it up is
that I have all of my libraries output going to a common
lib directory
rather than the Debug of the library's project. But under
normal
circumstances I can put breakpoints in my ap code and it
works. I can
even step into the library code and that works. Only in
this one case
it messes up. One thing that is perhaps special about the
case is that
the function with the problem is like a callback. It is
being called
from a virtual function in one of the libraries. I don't
know exactly
how to isolate what it is about this that is confusing it.
You should ensure a couple of things:
1. Code is compiled with debug information (/Zi or /ZI
switch). So, .PDB files are produced. You can also compile
it with /Z7 switch, so compiler will embed debug information
in .OBJ files. However, there are drawbacks with this
approach. Read more about /Z7 in MSDN, if interested. Also,
check /Fd compiler switch to figure out which name will be
assigned to resulting .PDB.
2. When performing post-build step (or whatever) in order to
copy resulting .LIB's in common directory, then don't forget
to copy respective .PDB's. Each project will have
<project_name>.PDB file.
3. During link, ensure that there is no liker warnings about
missing .PDB's. Also, pay attention that debug info is
generated and final .PDB is created (/DEBUG and /PDB linker
switches, respectively).
As a result you will end up with <project_name>.EXE and
<project_name>.PDB files. If you patch resulting .EXE
afterwards (version info, resources updates, etc..), then
debugger may fail to match .PDB, too since binary's checksum
is changed.
As an alternative mean, you can relax debugging setting:
"Require source files to exactly match the original
version". Sometimes it helps, too.
HTH
Alex