Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable Visual Studio debugger?

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.

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.

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.


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.

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

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.

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.

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.

like image 212
Rook Avatar asked Apr 14 '11 19:04

Rook


Video Answer


2 Answers

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.

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

  1. On the Start menu, search for and run 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\Microsoft\.NETFramework\DbgManagedDebugger
  3. If your computer is running 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

  4. Take care not to accidentally delete or change any other registry keys.
  5. Close the Registy Editor window.
like image 83
Afriza N. Arief Avatar answered Sep 23 '22 06:09

Afriza N. Arief


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
like image 22
Jitender kumar Gautam Avatar answered Sep 22 '22 06:09

Jitender kumar Gautam