Post by Frederic ForjanPost by David LowndesIt's become redundant, newer versions are smarter and *should* just
work without doing anything if the debug information is available for
the DLL.
But in this case, how can we put some breakpoint inside these DLL before
starting the application ?
If you built the dll on the same machine, and have generated .pdb
files, then a breakpoint in the source code will be auto-inserted by
DevStudio when that dll loads. To do/check this, right click on your
dll project (NOT the solution, but the project entries in the solution
explorer), and get properties. Go to Configuration Properties ->
C/C++, and ensure that 'Debug Information Format' is set to 'Program
Database' or 'Program Database for Edit & Continue'. (The former makes
sense for release builds, the latter for debug builds.) Also, look at
Configuration Properties -> Linker -> Debugging, and make sure that
'Generate Debug Info' is set to yes, and you're generating a program
database file.
Once you have built your dll with the above settings, (1) in the
Visual Studio .sln you use to run your exe, open up the .c/.cpp/.h
file(s) you want to put breakpoints on. (2) Put a breakpoint on the
line(s) you want (F9 if you have the VC++6 keyboard shortcuts), (3)
Run the .exe. Obviously, if you run debug, it's easier to debug.
Nathan Mates
--
<*> Nathan Mates - personal webpage http://www.visi.com/~nathan/
# Programmer at Pandemic Studios -- http://www.pandemicstudios.com/
# NOT speaking for Pandemic Studios. "Care not what the neighbors
# think. What are the facts, and to how many decimal places?" -R.A. Heinlein