If you want to build the examples, or your own programs, for debugging, follow the instructions in this section. When you build for debugging, CodeView information is generated to help you use the CodeView debugger. For more information about CodeView, see Environment and Tools.
When you switch to debug mode, you set the _DEBUG flag so that the debugging facilities built into the example programs are enabled. The ASSERT and TRACE macros, explained in Chapter 2, will provide diagnostic information. Diagnostic messages are displayed to the debugger.
·To switch from release builds to debugging builds with PWB:
1.Open the project file for the program.
2.From the Build menu, choose the Build Options command.
3.Select “Use Debug Options.”
You will need to change the “Build directory” field in the same dialog box to specify the correct directory to build into.
4.Then build the program as explained in “How to Build with PWB” on page 9.
·To switch from release builds to debugging builds with NMAKE:
Add the DEBUG=1 option to your NMAKE command line, as illustrated here for the PHBOOK program:
NMAKE /F PHBOOK DEBUG=1
Note:
Case is significant for the DEBUG=1 option. It must be uppercase.