Intel® Inspector User Guide for Windows* OS

ID 767798
Date 7/13/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Configure Debug Mode for Applications in the Visual Studio* IDE

Before building applications in debug mode, configure debug mode with the optimal compiler and linker settings to produce the most accurate and complete Intel Inspector analysis results:

Compiler/Linker Property

Correct C/C++ Setting

Impact If Not Set Correctly

Debug information

Enabled (/Zi or /ZI)

Missing file/line information

Optimization

Disabled (/Od)

Incorrect file/line information

Dynamic runtime library

Selected (/MD or /MDd)

False positives or missing code locations

Basic runtime error checks

Disabled (do not use /RTC; Default option in Visual Studio* IDE)

False positives

Compiler/Linker Property

Correct Fortran Setting

Impact If Not Set Correctly

Debug information

Enabled (/debug:full)

Missing file/line information

Optimization

Disabled (/Od)

Incorrect file/line information

Dynamic runtime library

Selected (/libs:dll/threads or libs:dll/threads/dbglibs )

False positives or missing code locations

Basic runtime error checks

None (/check:none)

False positives

Configure Debug Mode for C/C++ Applications

  1. Right-click the project in the Solution Explorer to display a context menu, then choose Properties to display the Property Pages dialog box.

  2. In the Configuration drop-down list, choose Debug.

  3. In the left pane, choose Configuration Properties > C/C++.

    • Choose General and verify the Debug Information Format field is set to Program Database (/Zi) or Program Database for Edit & Continue (/ZI).

    • Choose Optimization and verify the Optimization field is set to Disabled (/Od).

    • Choose Code Generation. Verify the Runtime Library field is set to Multi-threaded DLL (/MD) or Multi-threaded Debug DLL (/MDd) and the Basic Runtime Checks field is set to Default.

  4. In the left pane, choose Configuration Properties > Linker > Debugging and verify the Generate Debug Info field is set to Yes (/DEBUG).

  5. Click the OK button to close the dialog box.

Configure Debug Mode for Fortran Applications

  1. Right-click the project in the Solution Explorer to display a context menu, then choose Properties to display the Property Pages dialog box.

  2. In the Configuration drop-down list, choose Debug.

  3. In the left pane, choose Configuration Properties > Fortran.

    • Choose Debugging and verify the Debug Information Format field is set to Full (/debug:full).

    • Choose Optimization and verify the Optimization field is set to Disable (/Od).

    • Choose Libraries and verify the Runtime Library field is set to Multithread DLL (/libs:dll/threads) or Debug Multithread DLL (libs:dll/threads/dbglibs).

    • Choose Run-time and verify the Runtime Error Checking field is set to None (/check:none).

  4. In the left pane, choose Configuration Properties > Linker > Debugging and verify the Generate Debug Info field is set to Yes (/DEBUG).

  5. Click the OK button to close the dialog box.