如何禁用Visual Studio调试器?

时间:2022-10-30 09:18:36

Not to bore you, I'm gonna make long story short. Two machines, identical systems on them, identical programs (mostly). One has Visual Studio installed, one has ... uhmm, something else.

别烦我,长话短说。两个机器,相同的系统,相同的程序(大部分)。一个有Visual Studio安装,一个有…嗯,别的东西。

Sometimes when I try to install applications from let's say a CD, Visual Studio's Just-In-Time Debugger pops up, reports an "unhandled win32 exception in ..." and asks whether I want to debug using "New instance of Microsoft VIsual Studio 2010". If I choose Yes, it runs VS, if I choose No it closes the thing, and I'm back in Windows Explorer.

有时,当我尝试从CD安装应用程序时,Visual Studio的即时调试器会弹出,报告一个“未处理的win32异常”,并询问我是否要使用“Microsoft Visual Studio 2010的新实例”进行调试。如果我选择Yes,它会运行VS,如果我选择No,它会关闭这个东西,我回到Windows资源管理器。

Which would be ok, except I know the application is perfectly all right, and this way I cannot install it (in this latest cast it was the client from my bank for internet banking and paying bills and such).

这是可以的,但是我知道这个应用程序是完全正确的,而且我无法安装它(在最近的这次投票中,它是来自我的银行的客户,负责互联网银行和支付账单等)。

So, how do I get rid of that thing (just-in-time debugger)?

那么,如何处理这个东西(即时调试器)呢?

I don't want to uninstall VS since I'm using it daily, of course.

我不想卸载VS,因为我每天都在使用它。


Edit 1 :: I tried disabling Just-In-Time debugging in VS's Tools/Options/Debugging/Just-In-Time, then unchecking all three checkmarks, but that just gave another error when trying to run the executable installation program.

编辑1:我尝试在VS的工具/选项/调试/即时调试中禁用即时调试,然后取消所有三个检查标记,但这只是在尝试运行可执行安装程序时出现的另一个错误。

An unhandled win32 exception occurred in autorun.exe [some number]. 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 ...

在autorun中发生了一个未处理的win32异常。exe[一些]。及时调试这个异常失败了:没有安装调试器启用了即时调试。在Visual Studio中,可以从…

Check the documentation index for 'Just-in-time debugging, errors' for more information.

查看文档索引以获得“即时调试,错误”以获得更多信息。

Very informative :/

非常丰富:/


Edit 2 :: The application runs fine on the other machine that doesn't have VS installed. To a large extent software on both machines is the same, with just some minor differences (systems installed from image). Minor differences: notepad2, ++, git, ... some small stuff that is left to dev's own choosing.

编辑2::应用程序在另一台没有安装VS的机器上运行良好。在很大程度上,两台机器上的软件都是相同的,只有一些细微的区别(系统安装在映像上)。小差异:notepad2, ++, git,…有些小事留给dev自己选择。

I don't want this to sound as rant against VS, since I realize it's taking that tone, but I extremelly dislike software that is not self contained and messes other software up. And I had the same problem before with other applications as well. So for now, I'm blaming VS.

我不希望这听起来像对VS的咆哮,因为我意识到它采取了那种语气,但我非常不喜欢不包含自包含的软件,并把其他软件弄得一团糟。我以前也遇到过同样的问题。所以现在,我在指责VS。

If necessary, I'm willing to disable all kinds of debugging for this thing to work permanently (mostly use print statements anyways), if that will help. And if it possible.

如果有必要的话,我愿意禁用这个东西的所有调试功能(不管怎样,主要是使用print语句),如果这样做会有帮助的话。如果有可能。

8 个解决方案

#1


30  

I just had this problem today with Visual Studio 2013. This MSDN article: Just-In-Time Debugging in Visual Studio works for me. In my case, I just rename Debugger to Debugger_del and DbgManagedDebugger to DbgManagedDebugger_del.

我今天刚刚在Visual Studio 2013上遇到了这个问题。这篇MSDN文章:Visual Studio中的即时调试对我来说很有用。在我的例子中,我只是将调试器重命名为Debugger_del,将DbgManagedDebugger重命名为DbgManagedDebugger_del。

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

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

  1. On the Start menu, search for and run regedit.exe

    在开始菜单上,搜索并运行regedit.exe。

  2. In the Registry Editor window, locate and delete the follow registry keys:

    在注册表编辑器窗口中,找到并删除以下注册表项:

    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger
    • 微软HKEY_LOCAL_MACHINE \ SOFTWARE \ \ Windows NT \ CurrentVersion \ AeDebug \调试器
    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\DbgManagedDebugger
    • 微软HKEY_LOCAL_MACHINE \ SOFTWARE \ \ .NETFramework \ DbgManagedDebugger
  3. If your computer is running a 64-bit operating system, also delete the following registry keys:

    如果您的计算机正在运行一个64位操作系统,也要删除以下注册表项:

    • HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger

      微软HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node \ \ Windows NT \ CurrentVersion \ AeDebug \调试器

    • HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\DbgManagedDebugger

      HKEY_LOCAL_MACHINE \ \ Wow6432Node \ \ .NETFramework \ DbgManagedDebugger微软软件

  4. Take care not to accidentally delete or change any other registry keys.
  5. 注意不要意外地删除或更改任何其他注册表项。
  6. Close the Registy Editor window.
  7. 关闭“注册编辑器”窗口。

#2


15  

Enabling or disabling Just-In-Time debugging

启用或禁用即时调试。

You can enable or disable Just-In-Time debugging from the Options dialog box. To enable or disable Just-In-Time debugging

您可以在“选项”对话框中启用或禁用即时调试。启用或禁用实时调试。

  • On the Tools menu, click Options.
  • 在“工具”菜单上,单击“选项”。
  • In the Options dialog box, select the Debugging folder.
  • 在“选项”对话框中,选择“调试”文件夹。
  • In the Debugging folder, select the Just-In-Time page.
  • 在调试文件夹中,选择即时页面。
  • In the Enable Just-In-Time debugging of these types of code box, select or clear the relevant program types: Managed, Native, or Script.
  • 在这些类型的代码框的实时调试中,选择或清除相关的程序类型:托管、本机或脚本。
  • To disable Just-In-Time debugging, once it has been enabled, you must be running with Administrator privileges. Enabling Just-In-Time debugging sets a registry key, and Administrator privileges are required to change that key.
  • 要禁用即时调试,一旦启用,必须使用管理员特权运行。启用即时调试设置注册表项,并且需要管理员特权来更改该密钥。
  • Click OK
  • 单击OK

#3


5  

I am adding this response even though this is an old topic because I have just spent most of the day on this very issue and finally solved it. Every solution I found focused on disabling or turning off JIT debugging in Visual Studio, deleting keys from the registry or changing IE script debugging settings. But if you don't have a registered copy of VS, you have a problem. Of course, many of the solutions work in different ways but then you are left with the error above "no installed debugger has just-in-time debugging enabled" which no-one seems to have an answer for. However, the answer is not to disable JIT but rather stop server side debugging in your application. Unless you actually want to do server side debugging it is not necessary for it to be on.

我添加了这个响应,尽管这是一个老话题因为我在这个问题上花了很多时间最终解决了这个问题。我发现的每个解决方案都关注于在Visual Studio中禁用或关闭JIT调试、从注册表中删除键或更改IE脚本调试设置。但是如果你没有一个v的注册副本,你就有问题了。当然,许多解决方案以不同的方式工作,但是您会遇到上面的错误“没有已安装调试器支持即时调试”,似乎没有人对此有答案。但是,答案不是禁用JIT,而是在应用程序中停止服务器端调试。除非您确实想要进行服务器端调试,否则它没有必要处于on状态。

It makes complete sense to me now because I had server side debugging turned on in ASP. Before installing VS, it made no difference because no debugger was assigned to handle the bugs so they were sent to the browser. Once I installed VS, JIT took over and did what tit was supposed to do.

这对我来说很有意义,因为在ASP中我有服务器端调试。在安装VS之前,它没有什么区别,因为没有指定调试器来处理错误,所以它们被发送到浏览器。一旦我安装了VS, JIT就接管了,并完成了这个任务。

So the quick answer, open IIS, click on default sites or your sites and in your application settings, ASP in my case, turn off server side debugging!!

所以快速的答案,打开IIS,点击默认站点或你的站点,在你的应用程序设置中,ASP在我的例子中,关闭服务器端调试!

It may not be everyone's answer, or even the solution to the above problem, but hope it provides more insight to this problem and help someone else.

它可能不是每个人的答案,甚至不是上述问题的解决方案,但希望它能提供更多关于这个问题的见解,并帮助其他人。

#4


1  

If you're running the same software on two machines and it's crashing on one(which is what's happening if the debugger is starting) then you probably have something else going wrong on your machine. It could be that you've got driver incompatibility issues, or that some of the other software you have installed on the machine has incompatible versions of dll's...

如果你在两台机器上运行相同的软件,而且它正在崩溃(如果调试器启动了,这就是正在发生的事情),那么你可能在你的机器上出现了其他问题。可能是你遇到了驱动程序不兼容的问题,或者是你在机器上安装的其他软件有dll的不兼容版本……

You need to try to eliminate as many of the differeces as you can (easier said than done, I know)... If you copy the contents of the CD onto a local disk, does that help? If you shutdown your virus checker while you install the software does that help? Does it help if you turn the network off? You've said that both machines have 'mostly' the same, software, what happens if you uninstall some of the differences? Have both machines been patched to the same level?

你需要尽可能多地消除你的差异(说起来容易做起来难)……如果您将CD的内容复制到本地磁盘,这有帮助吗?如果你在安装软件时关闭了你的病毒检测程序,这有帮助吗?如果你把网络关掉会有帮助吗?你说过,这两台机器“基本上”都有相同的软件,如果你卸载其中的一些差异会发生什么?这两台机器都修好了吗?

As Visual studio is trying to start up when you have issues, have a look at the call stack and see what dlls are loaded, print it out... run some of the other software that crashes on that machine and do the same thing... look for any common libraries and do a comparison between the machines to see if they have the same version of the libraries...

当Visual studio试图在您遇到问题时启动时,请查看调用堆栈并查看加载了哪些dll,并将其打印出来……运行其他一些在机器上崩溃的软件,做同样的事情……查找任何公共库,并在机器之间进行比较,看看它们是否有相同版本的库……

Of course it could also be that it's a hardware issue (I've had intermittent failures before now because one of my drives was getting ready to fail and others because my graphics chip was running too hot)...

当然,这也可能是硬件问题(我之前有过间歇性故障,因为我的一个驱动器即将出现故障,而另一个驱动器则因为我的显卡运行得太热而出现故障)……

As I said, not really an answer, but some things to consider...

正如我所说,不是一个真正的答案,而是一些需要考虑的事情……

If all else fails... you're probably stuck doing your bills on the other computer (although another experiment might be to create a VPC on the broken pc to see if it worked then)...

如果一切都失败了……你可能会被困在另一台电脑上处理账单(尽管另一个实验可能是在坏掉的电脑上创建一个VPC,看看它是否能工作)……

#5


1  

the question is rather old, but to who might still looking in here for an answer I found the following Microsoft MSDN page that helped me to disable the just-in-time debugger:

这个问题由来已久,但对于谁还在这里寻找答案,我发现了以下Microsoft MSDN页面,它帮助我禁用了即时调试器:

http://msdn.microsoft.com/en-us/library/k8kf6y2a(v=vs.80).aspx http://msdn.microsoft.com/en-us/library/5hs4b7a6.aspx

http://msdn.microsoft.com/en-us/library/k8kf6y2a(v = vs.80)是http://msdn.microsoft.com/en-us/library/5hs4b7a6.aspx

it worked for me in 2010 Shell Edition.

它在2010年的Shell Edition中对我起了作用。

#6


1  

regarding the key in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug and SOFTWARE\WOW6432Node\Microsoft, I could only change the Auto value from 1 to 0 and it worked.:

关于HKEY_LOCAL_MACHINE\软件\Microsoft\Windows NT\CurrentVersion\AeDebug和SOFTWARE\WOW6432Node\Microsoft的key,我只能将自动值从1更改为0,这样就可以了。

REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug" /v Auto /d 0
REG ADD "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug" /v Auto /d 0

#7


0  

Right click on Project--Properties. Select the 'Web' tab. Under Debuggers, check 'Silverlight' (beside ASP.NET that is already checked).

右键单击项目——属性。选择“网络”选项卡。在调试器下,检查“Silverlight”(除了ASP)。那是已经被检查)。

Now visual studio won't debug your javascript because fortunately it can't debug Silverlight and javascript at the same time. You can now attach your javascript to the browser debugger.

visual studio不会调试javascript,因为幸运的是它不能同时调试Silverlight和javascript。现在可以将javascript附加到浏览器调试器。

#8


-1  

This problem was appearing when I started pdf viewer. I reinstalled this program in other folder (another disc in comp) and in my case it worked.

当我开始使用pdf查看器时,这个问题就出现了。我将这个程序重新安装到其他文件夹(comp中的另一个磁盘),在我的情况下,它起作用了。

#1


30  

I just had this problem today with Visual Studio 2013. This MSDN article: Just-In-Time Debugging in Visual Studio works for me. In my case, I just rename Debugger to Debugger_del and DbgManagedDebugger to DbgManagedDebugger_del.

我今天刚刚在Visual Studio 2013上遇到了这个问题。这篇MSDN文章:Visual Studio中的即时调试对我来说很有用。在我的例子中,我只是将调试器重命名为Debugger_del,将DbgManagedDebugger重命名为DbgManagedDebugger_del。

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

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

  1. On the Start menu, search for and run regedit.exe

    在开始菜单上,搜索并运行regedit.exe。

  2. In the Registry Editor window, locate and delete the follow registry keys:

    在注册表编辑器窗口中,找到并删除以下注册表项:

    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger
    • 微软HKEY_LOCAL_MACHINE \ SOFTWARE \ \ Windows NT \ CurrentVersion \ AeDebug \调试器
    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\DbgManagedDebugger
    • 微软HKEY_LOCAL_MACHINE \ SOFTWARE \ \ .NETFramework \ DbgManagedDebugger
  3. If your computer is running a 64-bit operating system, also delete the following registry keys:

    如果您的计算机正在运行一个64位操作系统,也要删除以下注册表项:

    • HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger

      微软HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node \ \ Windows NT \ CurrentVersion \ AeDebug \调试器

    • HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\DbgManagedDebugger

      HKEY_LOCAL_MACHINE \ \ Wow6432Node \ \ .NETFramework \ DbgManagedDebugger微软软件

  4. Take care not to accidentally delete or change any other registry keys.
  5. 注意不要意外地删除或更改任何其他注册表项。
  6. Close the Registy Editor window.
  7. 关闭“注册编辑器”窗口。

#2


15  

Enabling or disabling Just-In-Time debugging

启用或禁用即时调试。

You can enable or disable Just-In-Time debugging from the Options dialog box. To enable or disable Just-In-Time debugging

您可以在“选项”对话框中启用或禁用即时调试。启用或禁用实时调试。

  • On the Tools menu, click Options.
  • 在“工具”菜单上,单击“选项”。
  • In the Options dialog box, select the Debugging folder.
  • 在“选项”对话框中,选择“调试”文件夹。
  • In the Debugging folder, select the Just-In-Time page.
  • 在调试文件夹中,选择即时页面。
  • In the Enable Just-In-Time debugging of these types of code box, select or clear the relevant program types: Managed, Native, or Script.
  • 在这些类型的代码框的实时调试中,选择或清除相关的程序类型:托管、本机或脚本。
  • To disable Just-In-Time debugging, once it has been enabled, you must be running with Administrator privileges. Enabling Just-In-Time debugging sets a registry key, and Administrator privileges are required to change that key.
  • 要禁用即时调试,一旦启用,必须使用管理员特权运行。启用即时调试设置注册表项,并且需要管理员特权来更改该密钥。
  • Click OK
  • 单击OK

#3


5  

I am adding this response even though this is an old topic because I have just spent most of the day on this very issue and finally solved it. Every solution I found focused on disabling or turning off JIT debugging in Visual Studio, deleting keys from the registry or changing IE script debugging settings. But if you don't have a registered copy of VS, you have a problem. Of course, many of the solutions work in different ways but then you are left with the error above "no installed debugger has just-in-time debugging enabled" which no-one seems to have an answer for. However, the answer is not to disable JIT but rather stop server side debugging in your application. Unless you actually want to do server side debugging it is not necessary for it to be on.

我添加了这个响应,尽管这是一个老话题因为我在这个问题上花了很多时间最终解决了这个问题。我发现的每个解决方案都关注于在Visual Studio中禁用或关闭JIT调试、从注册表中删除键或更改IE脚本调试设置。但是如果你没有一个v的注册副本,你就有问题了。当然,许多解决方案以不同的方式工作,但是您会遇到上面的错误“没有已安装调试器支持即时调试”,似乎没有人对此有答案。但是,答案不是禁用JIT,而是在应用程序中停止服务器端调试。除非您确实想要进行服务器端调试,否则它没有必要处于on状态。

It makes complete sense to me now because I had server side debugging turned on in ASP. Before installing VS, it made no difference because no debugger was assigned to handle the bugs so they were sent to the browser. Once I installed VS, JIT took over and did what tit was supposed to do.

这对我来说很有意义,因为在ASP中我有服务器端调试。在安装VS之前,它没有什么区别,因为没有指定调试器来处理错误,所以它们被发送到浏览器。一旦我安装了VS, JIT就接管了,并完成了这个任务。

So the quick answer, open IIS, click on default sites or your sites and in your application settings, ASP in my case, turn off server side debugging!!

所以快速的答案,打开IIS,点击默认站点或你的站点,在你的应用程序设置中,ASP在我的例子中,关闭服务器端调试!

It may not be everyone's answer, or even the solution to the above problem, but hope it provides more insight to this problem and help someone else.

它可能不是每个人的答案,甚至不是上述问题的解决方案,但希望它能提供更多关于这个问题的见解,并帮助其他人。

#4


1  

If you're running the same software on two machines and it's crashing on one(which is what's happening if the debugger is starting) then you probably have something else going wrong on your machine. It could be that you've got driver incompatibility issues, or that some of the other software you have installed on the machine has incompatible versions of dll's...

如果你在两台机器上运行相同的软件,而且它正在崩溃(如果调试器启动了,这就是正在发生的事情),那么你可能在你的机器上出现了其他问题。可能是你遇到了驱动程序不兼容的问题,或者是你在机器上安装的其他软件有dll的不兼容版本……

You need to try to eliminate as many of the differeces as you can (easier said than done, I know)... If you copy the contents of the CD onto a local disk, does that help? If you shutdown your virus checker while you install the software does that help? Does it help if you turn the network off? You've said that both machines have 'mostly' the same, software, what happens if you uninstall some of the differences? Have both machines been patched to the same level?

你需要尽可能多地消除你的差异(说起来容易做起来难)……如果您将CD的内容复制到本地磁盘,这有帮助吗?如果你在安装软件时关闭了你的病毒检测程序,这有帮助吗?如果你把网络关掉会有帮助吗?你说过,这两台机器“基本上”都有相同的软件,如果你卸载其中的一些差异会发生什么?这两台机器都修好了吗?

As Visual studio is trying to start up when you have issues, have a look at the call stack and see what dlls are loaded, print it out... run some of the other software that crashes on that machine and do the same thing... look for any common libraries and do a comparison between the machines to see if they have the same version of the libraries...

当Visual studio试图在您遇到问题时启动时,请查看调用堆栈并查看加载了哪些dll,并将其打印出来……运行其他一些在机器上崩溃的软件,做同样的事情……查找任何公共库,并在机器之间进行比较,看看它们是否有相同版本的库……

Of course it could also be that it's a hardware issue (I've had intermittent failures before now because one of my drives was getting ready to fail and others because my graphics chip was running too hot)...

当然,这也可能是硬件问题(我之前有过间歇性故障,因为我的一个驱动器即将出现故障,而另一个驱动器则因为我的显卡运行得太热而出现故障)……

As I said, not really an answer, but some things to consider...

正如我所说,不是一个真正的答案,而是一些需要考虑的事情……

If all else fails... you're probably stuck doing your bills on the other computer (although another experiment might be to create a VPC on the broken pc to see if it worked then)...

如果一切都失败了……你可能会被困在另一台电脑上处理账单(尽管另一个实验可能是在坏掉的电脑上创建一个VPC,看看它是否能工作)……

#5


1  

the question is rather old, but to who might still looking in here for an answer I found the following Microsoft MSDN page that helped me to disable the just-in-time debugger:

这个问题由来已久,但对于谁还在这里寻找答案,我发现了以下Microsoft MSDN页面,它帮助我禁用了即时调试器:

http://msdn.microsoft.com/en-us/library/k8kf6y2a(v=vs.80).aspx http://msdn.microsoft.com/en-us/library/5hs4b7a6.aspx

http://msdn.microsoft.com/en-us/library/k8kf6y2a(v = vs.80)是http://msdn.microsoft.com/en-us/library/5hs4b7a6.aspx

it worked for me in 2010 Shell Edition.

它在2010年的Shell Edition中对我起了作用。

#6


1  

regarding the key in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug and SOFTWARE\WOW6432Node\Microsoft, I could only change the Auto value from 1 to 0 and it worked.:

关于HKEY_LOCAL_MACHINE\软件\Microsoft\Windows NT\CurrentVersion\AeDebug和SOFTWARE\WOW6432Node\Microsoft的key,我只能将自动值从1更改为0,这样就可以了。

REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug" /v Auto /d 0
REG ADD "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug" /v Auto /d 0

#7


0  

Right click on Project--Properties. Select the 'Web' tab. Under Debuggers, check 'Silverlight' (beside ASP.NET that is already checked).

右键单击项目——属性。选择“网络”选项卡。在调试器下,检查“Silverlight”(除了ASP)。那是已经被检查)。

Now visual studio won't debug your javascript because fortunately it can't debug Silverlight and javascript at the same time. You can now attach your javascript to the browser debugger.

visual studio不会调试javascript,因为幸运的是它不能同时调试Silverlight和javascript。现在可以将javascript附加到浏览器调试器。

#8


-1  

This problem was appearing when I started pdf viewer. I reinstalled this program in other folder (another disc in comp) and in my case it worked.

当我开始使用pdf查看器时,这个问题就出现了。我将这个程序重新安装到其他文件夹(comp中的另一个磁盘),在我的情况下,它起作用了。