Udostępnij za pośrednictwem


MFC Debugging Techniques

This topic applies to:

Edition

Visual Basic

C#

C++

Web Developer

Express

Topic does not apply Topic does not apply

Native only

Topic does not apply

Standard

Topic does not apply Topic does not apply

Native only

Topic does not apply

Pro and Team

Topic does not apply Topic does not apply

Native only

Topic does not apply

Table legend:

Topic applies

Applies

Topic does not apply

Does not apply

Topic applies but command hidden by default

Command or commands hidden by default.

If you are debugging an MFC program, these debugging techniques may be useful.

In This Section

  • AfxDebugBreak
    Describes the AfxDebugBreak function, which you can use to hardcode breakpoints in source code.

  • The TRACE Macro
    Discusses and provides examples of the ATLTRACE and MFC TRACE macros, which enable you to display messages from your program in the debugger Output window.

  • Detecting Memory Leaks in MFC
    Provides links to MFC classes and functions that detect memory that is allocated but never deallocated. Links include: tracking memory allocations, enabling memory diagnostics, taking memory snapshots, viewing memory statistics, and object dumps.

  • Reducing the Size of an MFC Debug Build
    Provides solutions to the large amount of disk space used by debug information when you build a Debug version of an MFC application.

  • MFC Assertions
    Discusses and provides example code for using the ASSERT macro to check for assertion failures.

  • Debugging Visual C++
    Discusses some common debugging problems and techniques for C and C++ applications.

  • Debugger Security
    Provides recommendations for more secure debugging.