visual-studio vsjitdebugger.exe (Visual Studio Debugger) - 在生产服务器的任务管理器中显示很多

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1744517/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 11:13:56  来源:igfitidea点击:

vsjitdebugger.exe (Visual Studio Debugger) - shows up lots in my task manager in production server

c#visual-studio

提问by bugfixr

I've got a .net web site which runs on IIS. Once every few days I look at the task manager and I've got 10-15 vsjitdebugger.exe processes open. Each one ties up some connections so it causes problems with the db pool unless I manually go in and end the process.

我有一个在 IIS 上运行的 .net 网站。每隔几天我就会查看任务管理器,发现有 10-15 个 vsjitdebugger.exe 进程打开。每个连接都会占用一些连接,因此除非我手动进入并结束该过程,否则它会导致数据库池出现问题。

At one point, Visual Studio was installed on this box, though it's since been uninstalled. I'm wondering if this is the reason the debugger tries to start when an error occurs.

有一次,Visual Studio 安装在这个盒子上,尽管它已经被卸载了。我想知道这是否是发生错误时调试器尝试启动的原因。

However, what I want to know is how do I get IIS to stop attempting to launch the debugger when an error happens? Is there anyway that it can simply go on with life without trying to debug?

但是,我想知道的是如何让 IIS 在发生错误时停止尝试启动调试器?无论如何,它可以在不尝试调试的情况下继续生活吗?

I also wonder, could the way the app is deployed (as a debugged app with the PDB's instead of a release version) make a difference? Or even having debugging turned on in the web.config?

我也想知道,应用程序的部署方式(作为带有 PDB 而不是发布版本的调试应用程序)会有所不同吗?或者甚至在 web.config 中打开调试?

采纳答案by JaredPar

It sounds like the machine is configured to automatically run the debugger if an unhandled exception occurs in the process. You don't want this in a production server but instead likely want it to terminate the process. This behavior is controlled by the DbgManagedDebugger key in the registry. Here is the documentation for that key

如果进程中发生未处理的异常,机器似乎被配置为自动运行调试器。您不希望在生产服务器中使用它,而是希望它终止进程。此行为由注册表中的 DbgManagedDebugger 项控制。这是该密钥的文档

回答by nithins

It could be that you still have the debugger regkeys set. Can you check the value of your HKLM\Software\Microsoft\Windows NT\CurrentVersion\AEDebuger\Debugger and the HKLM\Software\Microsoft.NETFramework\DbgManagedDebugger keys. These are the keys that the OS looks at when an unhandled exception occurs (it will launch whatever these keys are set to).

可能是您仍然设置了调试器注册键。你能检查一下 HKLM\Software\Microsoft\Windows NT\CurrentVersion\AEDebuger\Debugger 和 HKLM\Software\Microsoft.NETFramework\DbgManagedDebugger 键的值。这些是发生未处理异常时操作系统查看的键(它将启动这些键设置的任何内容)。

回答by Richard Anthony Hein

Sometimes a developer puts in a line of code to Debugger.Launch() and forgets to remove it. That will force the JIT dialog to say, "An exception 'Launch for user' has occurred ...". If you are getting that message then it's a hardcoded statement to launch the debugger.

有时,开发人员将一行代码放入 Debugger.Launch() 并忘记删除它。这将强制 JIT 对话框说,“发生了异常‘为用户启动’……”。如果您收到该消息,则它是启动调试器的硬编码语句。