jit调试_如何关闭/禁用.NET JIT调试对话框

jit调试

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调试

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值