Enabling Just-In-Time Debugging for Windows Forms
To enable Just-In-Time debugging of a Windows Form
- Set the
jitDebuggingvalue 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:
For more information, see DebuggableAttribute Constructor.