Disabling JIT Debugging Dialog Box

When an executable throws unhandled exception by default JIT-debugging kicks in that allow you to attach a debugger to the dying process and investigate the issue. This useful feature can become annoying during the development where you just want to get the stack dump of the unhandled exception. The Visual Studio 2005 and Vista have JIT debugging enabled by default.

However it is really easy to turn it off. Change the value of the registry key HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework\DbgJITDebugLaunchSetting to 1 to get the stack dump, the process will be terminated after that.

For more information: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconenablingjit-attachdebugging.asp