This documentation is archived and is not being maintained.

How to: Reduce the Size of an MFC Debug Build 

This topic applies to:

Visual Studio Edition

Visual Basic

C#

C++

J#

Express

No

No

Native

No

Standard

No

No

Native

No

Pro/Team

No

No

Native

No

NoteNote

The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. To change your settings, choose Import and Export Settings on the Tools menu. For more information, see Visual Studio Settings.

The debug information for a large MFC application can take up a lot of disk space.

To reduce the size of debug information

  • Rebuild the MFC libraries using the /Zi or /ZI option, instead of /Z7. These options build a single program database (PDB) file that contains debug information for the entire library, reducing redundancy and saving space.

    -or-

    Rebuild the MFC libraries without debug information (no /Z7, /Zi, /ZI (Debug Information Format) option). In this case, the lack of debug information will prevent you from using most debugger facilities within the MFC library code, but because the MFC libraries are already thoroughly debugged, this may not be a problem.

    -or-

    Build your own application with debug information for selected modules only. For more information, see How to: Build an MFC Application with Debug Information for Selected Modules.

See Also

Show: