When you create applications in VC++ using application wizards the default configuration will be debug configuration. So you can debug easily by pressing F5 key and setting break points(F9) where ever in code. Now what about debugging application in Release mode(For making the project release build configuration select Build->SetActiveConfiguration->Win32Release). Some of you might have find that its difficult to debug with release version(if you are new to VC++). That is you cannot put breakpoint when build with Release configuration. Now when tried with F5 key on a release build application what you can see only is a disassembly window or where ever you put break point, that has been disabled.
So below is what you have to do for making the project debuggable in release version
In Project->Settings->C\C++ tab,
- Set Optimizations to Disable(Debug)
- Set Debug info to Program Database
In Project->Settings->Link->Category General set
- Check Debuginfo
See the below snapshots of Project->Settings changes from default.
Now rebuild and try putting the break point again, now its debuggable!
No comments:
Post a Comment