Visual C++ 6 Unleashed

Visual C++ 6 Unleashed

By MICKEY WILLIAMS and David Bennett

MFC Support for Debugging

You can debug the Microsoft Foundation Class (MFC) Library applications in a variety of ways. Some of the features MFC contains to help diagnose program problems are the

ASSERT and TRACE macros, the AssertValid and Dump member functions, the CMemoryState class (used to detect memory leaks) and the AfxEnableMemoryTracking and AfxDebugBreak global functions.

When developing your C++ programs, you probably have noticed that you can choose between building a Win32 debug version of the program or a Win32 release. Generally, when you are developing a program involving MFC, you want to detect bugs throughout development, build a Win32 debug version, and link it with the debug version of MFC. When the program is complete and bug-free, a Win32 release version is built and linked with the release version of MFC.

Share ThisShare This

Informit Network