Loading...
Loading...

Thursday, January 3, 2008

How to disable/turn off Visual Studio .NET JIT Debugger

How to disable/turn off Visual Studio .NET JIT Debugger

* How to disable/turn off Visual Studio .NET JIT Debugger
Option 1: Registry key from Enabling JIT Debugging

For an application that includes managed code, the common language runtime will present a similar dialog to JIT-attach a debugger. The registry key that controls this option is called HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework\DbgJITDebugLaunchSetting.

If value = 0, prompt the user by means of a message box. The choices are:
Continue. This results in a stack dump and process termination.
Attach a debugger. In this case, the runtime spawns the debugger listed in the DbgManagedDebugger registry key. If none, control is returned, and the process is terminated.
If value = 1, simply return control. This results in a stack dump, after which the process is terminated. (No more dialog)
If value = 2, spawn the debugger listed in the DbgManagedDebugger registry key.
Option 2: If you want to disable the JIT debug dialog, but still want an error dialog:

Visual Studio.NET|Tools|Options|Debugging|Just-In-Time and deselect "Common Language Runtime" and now you’ll get an OK/Cancel dialog instead of the select a Debugger Dialog. Note: The registry entry from Option 1 above will need to be 0 for the dialog to show up.

*Disabling Visual Studio "Just In time Debugger"

Go to Tools -> Options -> Debugging -> Just-In-Time and disable VS as the JIT debugger.

~Mahesh Lambe

http://maheshlambe.blogspot.com