Search This Blog

Thursday, August 16, 2012

How to Debug a Release build at C++ - VC6

follow the next steps
http://support.microsoft.com/kb/291585

i have no idea where its came from the next article


Debugging in Release Mode
I've heard a myth repeated many times by my fellow VC++ developers. It is that it is not possible to debug in Release Mode. Fortunately, this is a myth.
Rule 7: When all else fails try debugging in release mode.
It is possible to debug in Release mode. The first step is to turn on symbols:
  • In Project Settings (Alt-F2) under the "C++/C tab" set the category to "General" and change the Debug Info setting to "Program Database".
  • Under the "Link tab" check the "Generate Debug Info" tab.
  • Recompile using "Rebuild All"
This will allow you to see the symbols in the release version. You might want to also consider the following:
  • You may want disable your optimization settings when debugging your release version (though this isn't absolutely necessary).
  • If you have trouble placing breakpoints, the command "__asm {int 3}" will cause your program to stop at that line (be sure to remove these lines from your program when you are done debugging).
Debugging in release mode has several limitations.
  • The most annoying one is that you can't easily see into MFC because you don't have the symbols included for the MFC DLL.
  • You must add symbols to the release versions of all libraries and DLL's you wish to debug in your release application.

No comments: