Debugging Custom AppWizards
| Overviews | How Do I | Details |
Feature Only in Professional and Enterprise Editions Creating a Custom AppWizard is supported only in Visual C++ Professional and Enterprise Editions. For more information, see .
When MFCAPWZ.DLL generates your starter custom AppWizard project, it provides you with both Release and Pseudo Debug projects. The Pseudo Debug project is a Release project that disables optimizations and generates debugging information using the compiler’s Program Database (/Zi) option and the linker’s Generate Debug Information (/DEBUG) option. These option settings allow you to use the debugger while you are developing your custom AppWizard.
You must use the Pseudo Debug project to debug your custom AppWizard. Release projects (including Pseudo Debug projects) and Debug projects use two different and incompatible memory allocators. You do not have access to the Debug versions of the Visual C++ binarys. Using the Pseudo Debug project allows your custom AppWizard and the Release version of the Visual C++ binarys to use the same memory allocator.
A Pseudo Debug project defines the _PSEUDO_DEBUG preprocessor symbol, rather than the _DEBUG preprocessor symbol that signals a normal debug project, and uses its own local copies of the ASSERT, TRACE, and VERIFY debugging macros. You can find these macros in the generated files DEBUG.H and DEBUG.CPP.
The , , , and macros that exist in the MFC code are not available to you because your custom AppWizard must use the Release version of MFC. This means that these macros are not available if you inadvertently write code that would trigger them.
To debug your custom AppWizard
With your custom AppWizard’s project open, click the Settings command on the Project menu.
Click the Debug tab.
In the Executable for debug session box, type the location of MSDEV.EXE. For example,
C:\Microsoft Visual Studio\Common\msdev98\bin\MSDEV.EXE
.The next time you start the debugger, a new instance of the integrated development environment will launch.
Use the original instance of integrated development environment to set breakpoints in your custom AppWizard code and to examine its data using the Watch window and other debugging tools as needed.
Use the second instance of integrated development environment to launch your custom AppWizard for debugging.