如何停止“即时调试”阻塞构建服务器的消息

发布于 2024-08-14 06:29:12 字数 285 浏览 3 评论 0原文

我们的构建服务器(TeamCity,强烈推荐)在我们完成的 C++ 程序上运行一大堆测试套件。

总而言之,测试会导致我们的程序崩溃,通常会弹出一个 VisualStudio 对话框,让我可以通过 JustInTime 调试崩溃。该对话框使构建服务器停止运行。它不会将构建标记为失败,而是挂起。我已经关闭了 VisualStudio 中的即时调试功能,但是当它关​​闭时,您仍然收到一条消息“无法进行 JustinTime 调试,您可以在选项中将其打开”。

有谁知道一种方法来确保程序中任何未处理的异常不会导致任何模式对话框?

Our buildserver (TeamCity, much recommended), runs our a whole bunch of testsuites on our finished c++ program.

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".

Does anybody know of a way to ensure that any unhandled exception in a program does not result in any modal dialog?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

对不⑦ 2024-08-21 06:29:12

这篇 MSDN 文章介绍了如何禁用即时调试在 Windows 服务器上。我已将文章的相关部分包含在下面:

在服务器上安装 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

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:

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\DbgManagedDebugger

On 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

‘画卷フ 2024-08-21 06:29:12

删除(或重命名)c:\windows\system32\vsjitdebugger.exe。

我尝试删除注册表项,并尝试取消选中 Visual Studio 选项中的所有框,但都不起作用。

需要明确的是,我的情况不是 C++ 的情况。我使用的是 Micro Focus COBOL for Visual Studio 2010,通过使用注册表和 VS 选项建议,我设法摆脱了“想要调试?”的问题。对话框,但这导致了一个不同的对话框来阻止我的自动化过程:

Visual Studio 即时调试器

CASDBC.exe 中发生未处理的异常(“COBOL 运行时:检测到故障”)[3564]。即时调试
此异常失败并出现以下错误:未安装调试器
启用了即时调试。在 Visual Studio 中,即时
可以从“工具/选项/调试/即时”启用调试。

检查文档索引中的“即时调试,错误”
更多信息。

确定

Delete (or rename) 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.

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:

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

二智少女猫性小仙女 2024-08-21 06:29:12

我不建议编辑/删除注册表。通常注册表是一团糟。

对我有帮助的解决方案非常简单。我刚刚将 JIT 调试器添加到我的 Visual Studio 中。步骤如下:

  • 打开Windows 控制面板

  • 程序

  • 程序和功能

  • 查找Visual Studio 2017

  • 单击更改。在新打开的窗口中,导航到Individual Components选项卡,
  • 选中Just-In-Time debugger复选框,
  • 单击modify

在此处输入图像描述

之后VS 重新加载错误应该得到修复。

I would not recommend to edit/remove regs. Usually the registry is a mess to play with.

The solution that helps me is a quite simple. I`ve just added JIT debugger to my Visual Studio. Steps are:

  • Open Windows Control panel

  • Programs

  • Programs and Features

  • Find Visual Studio 2017

  • Click Change. On a new opened window navigate to the Individual Components tab
  • Check Just-In-Time debugger checkbox
  • Click modify

enter image description here

After VS reload the error should be fixed.

千柳 2024-08-21 06:29:12

就我而言,在 win2012 服务器上,我尝试:

  • 删除注册表项,
  • 从 c:\windows\system32 中删除 jit 调试器的 exe

,但它仍然出现!

我重启了等等
使我的网站在 IIS 中停滞不前,直到对话框被确认为止!

最终解决方案确实有效:在控制面板中,在程序中:卸载“Microsoft Visual Studion 2010 Shell(隔离)”卸载它,问题就解决了。

(SQL Management Studio 是否仍然有效......我不知道!)

In my case , on win2012 server, I tried:

  • removing registry keys
  • deleting the exe for the jit debugger from c:\windows\system32

and it still came up!

I rebooted, etc.
Was making my web site in IIS stall until dialog was acknowledged!

Final solution, which did work: In control panel, in Programs: Uninstalled "Microsoft Visual Studion 2010 Shell (Isolated)" Uninstalled that, and problem solved.

(Whether SQL Management Studio still works.... I do not know!)

深海少女心 2024-08-21 06:29:12

在问题窗口中

您想使用选定的调试器进行调试吗?

单击(新窗口打开)> 选项(顶行菜单)> DEBUG

然后在新窗口中删除显示ENABLE JUST IN TIME DEBUGGER勾选
禁用JUST IN TIME 调试器后,关闭窗口或单击确定
你的问题将会得到解决。我已经尝试过这个并摆脱了及时弹出消息。

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

Then in the New window remove the TICK which shows ENABLE JUST IN TIME DEBUGGER.
After disabling the JUST IN TIME debugger close the window or click OK
Your problem will be solved. I've tried this and got rid of the JUST IN TIME POP UP messages.

你怎么这么可爱啊 2024-08-21 06:29:12

这个问题的最佳解决方案就是这么简单
只需 2 个步骤即可完成
打开cmd提示符
类型:注册表
转到路径-->HKEY_LOCAL_MACHINE-->软件-->Microsoft-->Windows NT-->CurrentVersion-->AeDebug
您现在可以找到该文件:调试器
右键,修改
复制此文本并将其粘贴到其中:

drwtsn32 -p %ld -e %ld -g

单击“确定”,瞧:)

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:

drwtsn32 -p %ld -e %ld -g

click ok and voila :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文