As we all know, vc6 projects are usually divided into two compiling versions by default: Debug and release. The former is mainly used for development and debugging, and the latter is used for external release. In most cases, the two versions have completely the same functions, but the debug version has some more debugging-friendly features.
However, in rare cases, the running results of the debug and release versions are different. For example, in the debug version, the program runs normally, but in the release version, the program may exit illegally. Because the release version program cannot set breakpoints and cannot debug tracing, it is difficult to find the root cause of the problem. In this case, adding debugging information for the release version should be a good choice.
I have encountered this situation recently and I will share it with you. But for a previous book ("programming guru else"?) Or the method mentioned in an article.
The following describes how to add debugging information for vc6 program release:
1. Choose build> Configuration... from the menu, click the Add button, copy a compilation option from the release version, and name it "release with debug info". Of course, the name is random.
2. Choose project> Settings..., select the "release with debug info" you just created in the upper left corner, and modify the following content:
A, C ++ | category: General: Set Optimizations to "Disable (Debug)", select "generate browse Info", and set debug info to "program database ".
B. Link | category: General: Select "Generate debug info ".
3. Choose build> set Active configuration... and select "release with debug info ".
After the above configuration, compile the program to get the "release program with debugging information". You can set program breakpoints and track debugging. This version of the program has both the debug side and the release side, of course more inclined to release.
After debugging and solving the problem, compile the release version (set Active configuration) and release it to the end user.