Export (0) Print
Expand All

Enabling Just-In-Time Debugging for Windows Forms

To enable Just-In-Time debugging of a Windows Form

  • Set the jitDebugging value in the machine.config or application.exe.config file (system.windows.forms section) to true. For example:
    <configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>
    
  • In addition, Windows Forms created with Managed Extensions for C++ must have the DebuggableAttribute set in a .config file or within their code. If you compile with /Zi and without /Og, the compiler sets this attribute for you. If you want to debug a nonoptimized release build, however, you must set this yourself by adding the following line to your application's AssemblyInfo.cpp file:
    [assembly:System::Diagnostics::DebuggableAttribute(true, true)]; 
    

    For more information, see DebuggableAttribute Constructor.

See Also

Just-In-Time Debugging | Just-In-Time, Debugging, Options Dialog Box

Show:
© 2014 Microsoft