visual-studio 如何停止阻塞构建服务器的“及时调试”消息
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1893567/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to stop "Just In Time Debugging" messages blocking a buildserver
提问by Lucas Meijer
Our buildserver (TeamCity, much recommended), runs our a whole bunch of testsuites on our finished c++ program.
我们的构建服务器(TeamCity,非常推荐)在我们完成的 C++ 程序上运行我们的一大堆测试套件。
Once in a whole, a test causes our program to crash, often bringing up a VisualStudio dialog offering me to JustInTime debug the crash. The dialog stops the buildserver from progressing. Instead of the build marked as failed, it just hangs. I've turned off the Just In Time debugging feature in VisualStudio, but when it's turned off, you still get a message "Couldn't JustinTime Debug this, you can turn it on in the options".
总的来说,一个测试会导致我们的程序崩溃,通常会弹出一个 VisualStudio 对话框,让我通过 JustInTime 调试崩溃。该对话框会阻止 buildserver 继续进行。而不是标记为失败的构建,它只是挂起。我已经关闭了 VisualStudio 中的即时调试功能,但是当它关闭时,您仍然收到一条消息“无法 JustinTime 调试此功能,您可以在选项中将其打开”。
Does anybody know of a way to ensure that any unhandled exception in a program does not result in any modal dialog?
有人知道确保程序中任何未处理的异常不会导致任何模式对话框的方法吗?
回答by Emerick Rogul
This MSDN article explains how to disable Just-In-Time debugging on a Windows server. I've included the relevant portion of the article below:
这篇 MSDN 文章解释了如何在 Windows 服务器上禁用实时调试。我在下面包含了文章的相关部分:
After Visual Studio is installed on a server, the default behavior when an unhandled exception occurs is to show an Exception dialog that requires user intervention to either start Just-In-Time debugging or ignore the exception. This may be undesirable for unattended operation. To configure the server to no longer show a dialog when an unhandled exception occurs (the default behavior prior to installing Visual Studio), use the registry editor to delete the following registry keys:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\DbgManagedDebuggerOn a 64-bit operating system also delete the following registry keys:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\DbgManagedDebugger
在服务器上安装 Visual Studio 后,发生未处理异常时的默认行为是显示一个异常对话框,该对话框需要用户干预以启动实时调试或忽略异常。这对于无人值守的操作可能是不希望的。要将服务器配置为在发生未处理的异常时不再显示对话框(安装 Visual Studio 之前的默认行为),请使用注册表编辑器删除以下注册表项:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\DbgManagedDebugger在 64 位操作系统上,还要删除以下注册表项:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\DbgManagedDebugger
回答by feuGene
Delete (or rename) c:\windows\system32\vsjitdebugger.exe.
删除(或重命名)c:\windows\system32\vsjitdebugger.exe。
I tried deleting the registry keys, and I tried unchecking all the boxes in the Visual Studio options, but neither worked.
我尝试删除注册表项,并尝试取消选中 Visual Studio 选项中的所有框,但都不起作用。
To be clear, my situation wasn't a C++ one. I was using Micro Focus COBOL for Visual Studio 2010, and by using the registry and VS options suggestions I managed to get rid of the "Want to debug?" dialog, but that resulted in a different dialog to hold up my automated process:
需要明确的是,我的情况不是 C++ 的情况。我在 Visual Studio 2010 中使用 Micro Focus COBOL,通过使用注册表和 VS 选项建议,我设法摆脱了“想要调试?” 对话框,但这导致了一个不同的对话框来阻止我的自动化过程:
Visual Studio Just-In-Time Debugger
An unhandled exception ('COBOL runtime: Fault detected') occurred in CASDBC.exe [3564]. Just-In-Time debugging this exception failed with the following error: No installed debugger has Just-In-Time debugging enabled. In Visual Studio, Just-In-Time debugging can be enabled from Tools/Options/Debugging/Just-In-Time.
Check the documentation index for 'Just-in-time debugging, errors' for more information.
OK
Visual Studio 即时调试器
CASDBC.exe [3564] 中发生未处理的异常(“COBOL 运行时:检测到故障”)。即时调试此异常失败并出现以下错误:未安装的调试器已启用即时调试。在 Visual Studio 中,可以从 Tools/Options/Debugging/Just-In-Time 启用实时调试。
查看“即时调试,错误”的文档索引以获取更多信息。
行
回答by Jonesome Reinstate Monica
In my case , on win2012 server, I tried:
就我而言,在 win2012 服务器上,我尝试过:
- removing registry keys
- deleting the exe for the jit debugger from c:\windows\system32
- 删除注册表项
- 从 c:\windows\system32 中删除 jit 调试器的 exe
and it still came up!
它仍然出现!
I rebooted, etc. Was making my web site in IIS stall until dialog was acknowledged!
我重新启动,等等。正在使我的网站在 IIS 中停止,直到对话框被确认!
Final solution, which did work: In control panel, in Programs: Uninstalled "Microsoft Visual Studion 2010 Shell (Isolated)" Uninstalled that, and problem solved.
最终解决方案,确实有效:在控制面板中,在程序中:卸载“Microsoft Visual Studion 2010 Shell(隔离)”卸载了那个,问题解决了。
(Whether SQL Management Studio still works.... I do not know!)
(SQL Management Studio 是否仍然有效......我不知道!)
回答by N.Kannan
In the Window for the question
在问题的窗口中
Do you want to Debug using the selected debugger?
您想使用选定的调试器进行调试吗?
Click YES(new window opens) > OPTIONS(top row menu) > DEBUG
单击YES(打开新窗口)> OPTIONS(顶行菜单)> DEBUG
Then in the New window remove the TICKwhich shows ENABLE JUST IN TIME DEBUGGER. After disabling the JUST IN TIME debuggerclose the window or click OKYour problem will be solved. I've tried this and got rid of the JUST IN TIME POP UPmessages.
然后在新窗口中删除显示ENABLE JUST IN TIME DEBUGGER的TICK。禁用JUST IN TIME 调试器后,关闭窗口或单击OK您的问题将得到解决。我已经尝试过这个并摆脱了及时弹出消息。
回答by neberaa
I would not recommend to edit/remove regs. Usually the registry is a mess to play with.
我不建议编辑/删除 regs。通常注册表是一团糟。
The solution that helps me is a quite simple. I`ve just added JIT debugger to my Visual Studio. Steps are:
帮助我的解决方案非常简单。我刚刚将 JIT 调试器添加到我的 Visual Studio。步骤是:
Open
Windows Control panelProgramsPrograms and FeaturesFind
Visual Studio 2017- Click
Change. On a new opened window navigate to theIndividual Componentstab - Check
Just-In-Time debuggercheckbox - Click
modify
打开
Windows Control panelProgramsPrograms and Features寻找
Visual Studio 2017- 单击
Change。在新打开的窗口中导航到Individual Components选项卡 - 勾选
Just-In-Time debugger复选框 - 点击
modify
After VS reload the error should be fixed.
VS 重新加载后,应该修复错误。
回答by Moussa
Best Solution for this problem is so simple 2 steps to make it done open cmd prompt type : regedit go to path-->HKEY_LOCAL_MACHINE-->SOFTWARE-->Microsoft-->Windows NT-->CurrentVersion-->AeDebug You can find now the file : Debugger right click , Modify copy and paste this text inside it:
此问题的最佳解决方案是如此简单 2 步即可完成 打开 cmd 提示符类型:regedit 转到路径-->HKEY_LOCAL_MACHINE-->SOFTWARE-->Microsoft-->Windows NT-->CurrentVersion-->AeDebug 您可以现在找到文件:调试器右键单击,修改复制并将此文本粘贴到其中:
drwtsn32 -p %ld -e %ld -g
drwtsn32 -p %ld -e %ld -g
click ok and voila :)
单击确定,瞧 :)


