Compiler Settings for Microsoft Visual C++ .NET

Applies to AQTime 8.81, last modified on January 18, 2022

This topic explains how to prepare applications created with Visual C++ 7.x for AQTime. To learn how to prepare applications created with other compilers, see the topics below:

Note that default settings created by Microsoft Visual Studio for a new Visual C++ .NET application already hold all necessary information for generating debug information. So, if you do not change the compiler settings, you can compile and profile your Visual C++ .NET application as is. The only thing we would recommend is to change the active configuration to Release if you are going to profile with the Performance profiler.  The Release configuration is used to build the final version of the application, so you should search for performance bottlenecks in versions compiled with the Release configuration, but not with the Debug configuration.

If you are not sure whether your application's compiler settings were changed, you can follow the steps described in this topic to make certain that your application is compiled with debug information.

To add debug information to your Visual C++ .NET application, follow these steps:

  1. Open your project in Visual Studio .NET.
  2. Select Build > Configuration Manager from the main menu. This will open the Configuration Manager dialog. Select the Release configuration for your project:
    Configuration Manager Dialog

    Close the dialog.

    Note: Of course, you can profile your application in any configuration, not just in the Release one. We recommend that you choose this configuration if you are going to use the Performance profiler (see above).
  3. Right-click the project in the Solution Explorer and select Properties from the context menu. This will call the Property Pages dialog.
  4. In the dialog,
    1. Select Active (Release) from the Configuration dropdown list.
    2. Switch to the Configuration Properties > C/C++ > General page and set Debug Information Format either to Program Database (/Zi) or to Program Database for Edit & Continue (/ZI). For more information on these options review Visual Studio .NET Help.
      Property Pages: Configuration Properties > C/C++ > General

      Click the image to enlarge it.

    3. Open the Configuration Properties > Linker > Debug property page and set the Generate Debug Info option to Yes (/DEBUG).
      Property Pages: Configuration Properties > Linker > Debug

      Click the image to enlarge it.

  5. Click OK to save settings and then rebuild the application. After that it will be ready for profiling in AQTime.

Before opening the application in AQTime, make sure that the output directory of your application includes the .pdb file you have created. In addition, this directory should contain the vcX0.pdb file, where X is the major version number of the Visual C++ compiler, e.g. for Visual C++ 7.0 this file is called vc70.pdb. vcX0.pdb holds part of your application's debugging information, which may be needed to profile the entire application in AQTime correctly. It is possible that the vc70.pdb file is not generated by Visual Studio and this will not cause any problems with profiling. If you are profiling an ActiveX control or a COM server, do not forget to register its "debug" version in the system (See Profiling COM Applications).

When your application is ready for final delivery, remember to compile it without debug information to reduce overall application size.

See Also

How AQTime Profilers Use Metadata and Debug Information
Profiling .NET Applications - Specifics

Highlight search results