如何禁用即时调试器?

时间:2021-07-20 08:32:25

Just provisioned a new server running IIS and Server 2012 and SQL Server 2012. I also installed SQL Server Management Studio tool so I can quickly inspect databases without the need to open a remote connection.

刚刚配置了一台运行IIS和Server 2012以及SQL Server 2012的新服务器。我还安装了SQL Server Management Studio工具,这样我就可以快速检查数据库,而无需打开远程连接。

When I browse an ASP.NET sites remotely, I get a Just-in-time debgugger exception dialog when an error is encountered in addition to the yellow screen. The dialog stays up on the server and piles up unless I RDP and manually close all the dialog boxes.

当我远程浏览ASP.NET站点时,除黄色屏幕外还遇到错误时,我会得到一个即时debgugger异常对话框。除非我RDP并手动关闭所有对话框,否则对话框将保持在服务器上并堆积起来。

The only way to disable this is by removing Visual Studio Shell 2010 (integrated) using the control panel. The side effect is that I can no longer use SSMS.

禁用此功能的唯一方法是使用控制面板删除Visual Studio Shell 2010(集成)。副作用是我不能再使用SSMS了。

Most of the available solutions are outdated or don't work. The registry settings are no longer applicable and most articles concerning this issue are old. Microsoft's official documentation is a rat's nest of broken links. Moreover, many users are confusing IE's script debugging dialog with this issue. Although they are related and similar, this specific issue is tied to Visual Studio's runtime environment.

大多数可用的解决方案已过时或无法使用。注册表设置不再适用,大多数有关此问题的文章都是旧的。微软的官方文档是破坏链接的老鼠窝。此外,许多用户都在混淆IE的脚本调试对话框。虽然它们是相关且相似的,但这个特定问题与Visual Studio的运行时环境有关。

Any ideas?

ASIDE: I can't believe Microsoft has this "feature" on a product that is installed on a production server. I am just floored by the incompetence of a multi-billion dollar corporation. I've seen my question asked since at least since 2005 with no official solution that works. I just have to ask one last time for sanity checking. I want to make sure I'm not the one who is "thick" in the head here.

ASIDE:我无法相信Microsoft在生产服务器上安装的产品上具有此“功能”。我被一家价值数十亿美元的公司无能为力。至少自2005年以来,我已经看到了我的问题,没有正式的解决方案可行。我只需要最后一次要求进行健全性检查。我想确保我不是那个头脑中“厚”的人。

4 个解决方案

#1


1  

You should be able to disable Jist-In-Time debugging using the Debug options dialog inside Visual Studio. The registry keys are also well documented here.

您应该能够使用Visual Studio中的“调试选项”对话框禁用Jist-In-Time调试。此处还详细记录了注册表项。

See:

Aside: I think it's not a wise thing to install a management studio on a production server. This is what management workstations are for. Remote connections from a management station can be pre-configured and stored so that it doesn't take much effort. That way you can keep your production environment clean.

旁白:我认为在生产服务器上安装管理工作室并不明智。这就是管理工作站的用途。可以预先配置和存储来自管理站的远程连接,这样就不需要花费太多精力。这样您就可以保持生产环境的清洁。

#2


5  

To disable Just-In-Time debugging by editing the registry

通过编辑注册表来禁用实时调试

In the Start menu, click Run. In the Run dialog box, type regedit, then click OK. In the Registry Editor window, locate and delete the follow registry keys:

在“开始”菜单中,单击“运行”。在“运行”对话框中,键入regedit,然后单击“确定”。在“注册表编辑器”窗口中,找到并删除以下注册表项:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\DbgManagedDebugger

If your computer is running a 64-bit operating system, delete the following registry keys also:

如果您的计算机运行的是64位操作系统,请同时删除以下注册表项:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\WindowsNT\CurrentVersion\AeDebug\Debugger
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\DbgManagedDebugger

Take care not to accidentally delete or change any other registry keys.

注意不要意外删除或更改任何其他注册表项。

Instead of deleting it, you can also just (temporarily) rename the AeDebug key for the bitness of your choice to something else, e.g. AeDebug-disable!

您也可以(暂时)将AeDebug键重命名为您选择的位数,而不是删除它,例如,的AeDebug,禁用!

#3


3  

For server 2012, IIS, and SSMS 2014 we tried all three registry three deletions and those did not work.

对于服务器2012,IIS和SSMS 2014,我们尝试了所有三个注册表三次删除,但这些删除无效。

What did work was old school renaming the JIT Debug executable.

什么工作是旧学校重命名JIT调试可执行文件。

Renamed these files.

重命名这些文件。

C:\WINDOWS\system32\vsjitdebugger.exe  
C:\Windows\SysWOW64\vsjitdebugger.exe 

Renamed this folder

重命名此文件夹

C:\Program Files\Common Files\Microsoft Shared\VS7Debug 

#4


1  

As a follow-up to nfox's answer, I've created a registry file that you can simple use instead of searching manually through regedit.exe.

作为nfox答案的后续内容,我创建了一个可以简单使用的注册表文件,而不是通过regedit.exe手动搜索。

1.) Copy this script to your clipboard:

1.)将此脚本复制到剪贴板:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug]
"Debugger"=-

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework]
"DbgManagedDebugger"=-

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug]
"Debugger"=-

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework]
"DbgManagedDebugger"=-

2.) Save it to a file with the .reg extension:

2.)将其保存到扩展名为.reg的文件中:

E.g. to a file named

例如。到一个名为的文件

C:\Users\<user name>\Desktop\DisableJit.reg

3.) Double click the file

3.)双击该文件

After confirming the appearing message box, the keys are getting deleted.

确认出现的消息框后,密钥将被删除。

5.) Alternatively: Download file

5.)或者:下载文件

If this is too much effort, you can download the registry file from here:

如果这是太费力,您可以从这里下载注册表文件:

Download and then double-click it.

下载然后双击它。


This tip was simply taken from the MSDN article "Just-In-Time Debugging in Visual Studio".

这个技巧只是从MSDN文章“Visual Studio中的即时调试”中获取的。

The syntax on how to delete registry keys via a .reg file was taken from the MSDN KB article "How to add, modify, or delete registry subkeys and values by using a .reg file".

有关如何通过.reg文件删除注册表项的语法取自MSDN知识库文章“如何使用.reg文件添加,修改或删除注册表子项和值”。

#1


1  

You should be able to disable Jist-In-Time debugging using the Debug options dialog inside Visual Studio. The registry keys are also well documented here.

您应该能够使用Visual Studio中的“调试选项”对话框禁用Jist-In-Time调试。此处还详细记录了注册表项。

See:

Aside: I think it's not a wise thing to install a management studio on a production server. This is what management workstations are for. Remote connections from a management station can be pre-configured and stored so that it doesn't take much effort. That way you can keep your production environment clean.

旁白:我认为在生产服务器上安装管理工作室并不明智。这就是管理工作站的用途。可以预先配置和存储来自管理站的远程连接,这样就不需要花费太多精力。这样您就可以保持生产环境的清洁。

#2


5  

To disable Just-In-Time debugging by editing the registry

通过编辑注册表来禁用实时调试

In the Start menu, click Run. In the Run dialog box, type regedit, then click OK. In the Registry Editor window, locate and delete the follow registry keys:

在“开始”菜单中,单击“运行”。在“运行”对话框中,键入regedit,然后单击“确定”。在“注册表编辑器”窗口中,找到并删除以下注册表项:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\DbgManagedDebugger

If your computer is running a 64-bit operating system, delete the following registry keys also:

如果您的计算机运行的是64位操作系统,请同时删除以下注册表项:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\WindowsNT\CurrentVersion\AeDebug\Debugger
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\DbgManagedDebugger

Take care not to accidentally delete or change any other registry keys.

注意不要意外删除或更改任何其他注册表项。

Instead of deleting it, you can also just (temporarily) rename the AeDebug key for the bitness of your choice to something else, e.g. AeDebug-disable!

您也可以(暂时)将AeDebug键重命名为您选择的位数,而不是删除它,例如,的AeDebug,禁用!

#3


3  

For server 2012, IIS, and SSMS 2014 we tried all three registry three deletions and those did not work.

对于服务器2012,IIS和SSMS 2014,我们尝试了所有三个注册表三次删除,但这些删除无效。

What did work was old school renaming the JIT Debug executable.

什么工作是旧学校重命名JIT调试可执行文件。

Renamed these files.

重命名这些文件。

C:\WINDOWS\system32\vsjitdebugger.exe  
C:\Windows\SysWOW64\vsjitdebugger.exe 

Renamed this folder

重命名此文件夹

C:\Program Files\Common Files\Microsoft Shared\VS7Debug 

#4


1  

As a follow-up to nfox's answer, I've created a registry file that you can simple use instead of searching manually through regedit.exe.

作为nfox答案的后续内容,我创建了一个可以简单使用的注册表文件,而不是通过regedit.exe手动搜索。

1.) Copy this script to your clipboard:

1.)将此脚本复制到剪贴板:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug]
"Debugger"=-

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework]
"DbgManagedDebugger"=-

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug]
"Debugger"=-

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework]
"DbgManagedDebugger"=-

2.) Save it to a file with the .reg extension:

2.)将其保存到扩展名为.reg的文件中:

E.g. to a file named

例如。到一个名为的文件

C:\Users\<user name>\Desktop\DisableJit.reg

3.) Double click the file

3.)双击该文件

After confirming the appearing message box, the keys are getting deleted.

确认出现的消息框后,密钥将被删除。

5.) Alternatively: Download file

5.)或者:下载文件

If this is too much effort, you can download the registry file from here:

如果这是太费力,您可以从这里下载注册表文件:

Download and then double-click it.

下载然后双击它。


This tip was simply taken from the MSDN article "Just-In-Time Debugging in Visual Studio".

这个技巧只是从MSDN文章“Visual Studio中的即时调试”中获取的。

The syntax on how to delete registry keys via a .reg file was taken from the MSDN KB article "How to add, modify, or delete registry subkeys and values by using a .reg file".

有关如何通过.reg文件删除注册表项的语法取自MSDN知识库文章“如何使用.reg文件添加,修改或删除注册表子项和值”。