
jit调试
A day may come when you want to turn off the Debug dialog that appears when a .NET program has an unhandled exception.
您可能需要一天的时间关闭.NET程序具有未处理的异常时出现的“调试”对话框。
Option 1: Registry key from Enabling JIT Debugging
选项1:启用JIT调试中的注册表项
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.
对于包含托管代码的应用程序,公共语言运行库将显示与JIT附加调试器类似的对话框。 控制此选项的注册表项称为HKEY_LOCAL_MACHINE \ Software \ Microsoft \ .NETFramework \ DbgJITDebugLaunchSetting。
If value = 0, prompt the user by means of a message box. The choices are:
如果value = 0,则通过消息框提示用户。 选择是:
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.
附加调试器。 在这种情况下,运行时将生成DbgManagedDebugger注册表项中列出的调试器。 如果不存在,则返回控制,并终止该过程。
If value = 0, prompt the user by means of a message box. The choices are:
如果value = 0,则通过消息框提示用户。 选择是:
If value = 1, simply return control. This results in a stack dump, after which the process is terminated. (No more dialog)
如果value = 1,只需返回控制。 这将导致堆栈转储,此后该过程将终止。 (没有更多对话框)
If value = 2, spawn the debugger listed in the DbgManagedDebugger registry key.
如果value = 2,则生成DbgManagedDebugger注册表项中列出的调试器。
Option 2: If you want to disable the JIT debug dialog, but still want an error dialog:
选项2:如果要禁用JIT调试对话框,但仍然想要一个错误对话框:
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.
Visual Studio.NET |工具|选项|调试|即时,并取消选择“公共语言运行时”,现在您将获得“确定/取消”对话框,而不是选择“调试器对话框”。 注意:以上选项1的注册表项必须为0才能显示对话框。
Thanks to Eric Deslauriers of Corillian QA for these tips!
感谢Corillian QA的Eric Deslauriers提供了这些提示!
翻译自: https://www.hanselman.com/blog/how-to-turn-offdisable-the-net-jit-debugging-dialog
jit调试