User Guide

  • 2020
  • 09/09/2020
  • Public Content
Contents

Configuring 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.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804