How to turn off / disable the .NET JIT debugging dialog

When a .NET program has an unhandled exception, you may want to turn off debugging dialog box that appears. Here are two options:

1, enable the JIT debugging registry key

For application contains managed code, the common language runtime will be similar to JIT debugger attach dialog box is displayed. This option controls registry key called HKEY_LOCAL_MACHINE \ Software \ Microsoft \ .NETFramework \ DbgJITDebugLaunchSetting.

  • If the value is 0, the user is prompted by a message box. Options include: "Continue" --- This will cause a stack dump and the process terminates. "Additional Debugger" --- In this case, the debugger DbgManagedDebugger generate registry keys listed in the runtime. If not, return control and terminate the process.
  • If the value is 1, the control is returned. This causes a stack dump, and then terminate the process. (No more dialogue)
  • If the value is 2, the debugger is generated registry key DbgManagedDebugger listed.

2, if you want to disable the "JIT debugging" box, but still need error dialog

Visual Studio.NET | Tools | Options | Debugging | Just-In-Time Cancel "under " the Common Language Runtime, " " choice, will now display "OK / Cancel" dialog box, rather than "select Debugger" box. Note: Option 1 above registry key required to display a dialog box to 0.

Guess you like

Origin www.cnblogs.com/yilang/p/12069119.html