Rajinder Yadav - C++ Windows Development Tools & Resources :Design, Code, Test, Debug

Page 1 Page 2 Page 3 Page 4 Home

Compiler Settings - Page 2

Go to the project property page of your project in Visual Studio. From the C/C++ General section make sure the Debug database format is set to "Program Database (/Zi)"

Next and this is an important step is to disable optimization, if you don't you're going to find out that sometimes the crash address will not line up with the source code.

Now go to the Linker section and turn off Incremental Linking, this is somewhat optional. I also like to do a clean build and make sure the linker is working with the freshest object files. I've seen object files get linked that were stale and then I was not able to set breakpoints in the newly written source code!

From the Linker's debugging section make sure "Generate Debug Info" is set to "Yes".

Once the application is build we want to save the exe as well as the .pdb symbol files, both will be required to get the crash location from the Visual Studio debugger.

Page 1 Page 2 Page 3 Page 4 Home

Rajinder Yadav Copyright (c) 2007