msvsmon.exe crashed when debugging

Visual StudioDebuggingRemote DebuggingVisual Studio-Debugging

Visual Studio Problem Overview


When I debugging in VS2013 update3, msvsmon.exe crashed when hit at a breakpoint.

It shows "The debugger's worker process (msvsmon.exe) unexpectedly exited. Debugging will be aborted".

I'm not using remote debug.

Is it possible to shut down the msvsmon.exe to avoid calling it when debugging ?

Visual Studio Solutions


Solution 1 - Visual Studio

Deleting all of the breakpoints solves the problem when I hit this error. Disabling the breakpoints was not enough - they had to be deleted.

I was able to attach to a process numerous times. Once I added a conditional breakpoint (with a few checks), I started getting this error when attempting to attach to that same process.

The error provided in the question is one problem. I also received an error stating that a debugger was already attached when I tried again. Either way, deleting breakpoints solved it.

Solution 2 - Visual Studio

Try turning on Options > Debugging > General > "Use Managed Compatibility Mode"

I got this error/crash too while debugging and trying to inspect a variable with 50 MB of text data in it. This option worked in both VS2013 and in VS2015 to allow me to debug and inspect the variable with large data.

setting to be enabled

Solution 3 - Visual Studio

A couple of things that worked for me:

  • Try Closing VStudio and relaunching.
  • If not, reboot helps.[I know thats generic, but its worth a shot]
  • Disable unnecessary break points.

Solution 4 - Visual Studio

I had this error also, and I too have Astrill installed. Completely uninstalling Astrill fixed the issue.

I reached out to Astrill support, and they answered (within 2 hours) saying the correct fix is to hold Ctrl and press the "Help" button on the Astrill application, and then choose "Uninstall LSP". This has fixed the issue without needing to un-install Astrill.

I don't know what LSP is, but I presume it's some sort of proxy.

Solution 5 - Visual Studio

In my case, it was caused by a VPN software. It changed my hosts file and my localhost was not 127.0.0.1 anymore.

So check your localhost in the hosts file (e. g. %WINDIR%\System32\drivers\etc\hosts) and make sure it is 127.0.0.1.

Solution 6 - Visual Studio

This error just occurred for me with visual studio 2015 RTM. Deleting all the breakpoints resolved the "The debugger's worker process (msvsmon.exe) unexpectedly exited. Debugging will be aborted" condition.

So If you clear all your breakpoints, in your version, you will not need to avoid using MSVSMON.exe.

Solution 7 - Visual Studio

I got the same error. No effect after deleting all breakpoints and repairing Visual Studio (I have 2013 Community Edition). The problem was the Bitdefender software. I have Bitdefender Internet Security 2016 and had set Active Thread Control (Modules->Antivirus) to Normal level. But after setting this settings to Permissive the error doesn't show up anymore.

enter image description here

Solution 8 - Visual Studio

I was using the OzCode debugger extension. Unfortunately they don't have a way to completely disable the extension - you can only disable certain features - so I had to completely uninstall it to confirm it was what was contributing to the crashes.

Solution 9 - Visual Studio

This error occured to me, when I tried to debug with Visual Studio / Service Pack 3, when Service Pack 4 was already released. After updating to the Service Pack 4 I was able to debug.

So, try installing the newest version of Visual Studio

Regards

Solution 10 - Visual Studio

Here's yet another answer: I changed my project from "Platform Target: Any CPU" to "Platform Target: x86". Went from needing about 5 attempts to debug to working every single time.

I had previously tried every suggestion in this thread: I reinstalled, I killed all breakpoints, and looked for fishy software interactions.

Solution 11 - Visual Studio

This (or something that manifests in exactly the same way) is still an issue in VS2017. In my case it was caused by a dependency being too large to debug. The dependency in question was a generated client for a large REST API. I was able to debug again after slimming down that dependency.

Solution 12 - Visual Studio

I hit this in Visual Studio 2019 (16.4.3) (C++) with a cause that I have not seen mentioned: I had accidentally added a Watch with incorrect syntax that was attempting to instantiate a singleton rather than returning the existing instance.

Repeatedly choosing right click > Clear All in the Watches view while debugging fixed the issue.

Solution 13 - Visual Studio

Fixed by changing Options->Projects and Solutions->Web Projects -> Use 64bit version of IIS......... to False.

Solution 14 - Visual Studio

In my case i am using the wcf Service on the wpf application and inputting parameters from here.The Wpf Application Execution on Facing this error "The debugger's worker process (msvsmon.exe) unexpectedly exited. Debugging will be aborted".

That case i am hosing the Wcf service and run the wpf application exe
In this type of Execution on I didn't Facing any Error like -- "The debugger's worker process (msvsmon.exe) unexpectedly exited. Debugging will be aborted"

please,try this proceed error solved because some execution process didn't supporting the debugging..... we are removing the Debuggers on also we face same error. that case on helped this process.......

Solution 15 - Visual Studio

I just experience this with VC2017 Community Edition 15.7.2. Turning off the Microsoft Symbol Server lookup while debugging fixed it for me.

Solution 16 - Visual Studio

I've just had the problem in VS 2015. I hadn't noticed that one of my breakpoints was bogus - I had inadvertently pressed F9 to set a breakpoint when the disassembly window was showing in the previous debugging session. The solution was simply to delete that one bogus breakpoint - I got to keep all my others.

Solution 17 - Visual Studio

I started getting this exact error today in my VS2019 project. Attempting to expand/inspect simple data structs in VS debugger would make it freeze for a minute and then I'd get that "The debugger's worker process (msvsmon.exe) unexpectedly exited. Debugging will be aborted" message:

enter image description here

If I add msvsmon.exe process to windows defender exclusions list, then the problem disappears.

Solution 18 - Visual Studio

I tried almost every answer in here, but for my case, nothing worked. Switching to 32-bit just made Visual Studio 2019 crash instead of msvsmon.exe crashing.

What did work for me is to set a very early breakpoint and use that opportunity to close the "Parallel Stacks" window. I didn't need that anyway, but it was open by default in my layout.

Solution 19 - Visual Studio

In my case, I had this error when I had the "Locals" tab opened during debugging and hitting a breakpoint. For some reason VS might've been unable to display one of the local variables. The error disappeared when switched to a different tab before hitting the breakpoint where the error was occurring.

Solution 20 - Visual Studio

My problems started after moving a project to a new folder. I wasn't having any luck with any of these answers using VS2019. I even deleted the entire .vs folder thinking maybe something got corrupted. No luck.

But on a whim I tried starting the project with CTRL-F5 instead of just F5 and that actually worked. It's consistent. CTRL-F5 runs fine. F5 gives me the msvsmon.exe error.

I have no idea what's going on, but at least I can get the project to run again.

Solution 21 - Visual Studio

I know it doesn't directly address the error, but as a workaround, I'm using the Rider IDE from JetBrains, and am not encountering the error (code, system, etc. the same).

Visual Studio version: Professional 2017, 15.5.4
Rider version: 2017.3

None of the other answers worked for me, when I encountered this error. If you are not actually remotely debugging, you can use another editor until you figure out the problem or it resolves itself (the latter was the case for me).

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionNFDreamView Question on Stackoverflow
Solution 1 - Visual StudioJim PrestoView Answer on Stackoverflow
Solution 2 - Visual StudioAndreyView Answer on Stackoverflow
Solution 3 - Visual StudioRonak AgrawalView Answer on Stackoverflow
Solution 4 - Visual StudioMathias WynneView Answer on Stackoverflow
Solution 5 - Visual StudioYiboView Answer on Stackoverflow
Solution 6 - Visual StudioIvanF72View Answer on Stackoverflow
Solution 7 - Visual StudioVadoView Answer on Stackoverflow
Solution 8 - Visual StudiocsrowellView Answer on Stackoverflow
Solution 9 - Visual StudioTheDjingel DjingView Answer on Stackoverflow
Solution 10 - Visual StudioArtHareView Answer on Stackoverflow
Solution 11 - Visual StudioStackOverthrowView Answer on Stackoverflow
Solution 12 - Visual StudioDarkView Answer on Stackoverflow
Solution 13 - Visual Studiouser2668812View Answer on Stackoverflow
Solution 14 - Visual StudioGuptaView Answer on Stackoverflow
Solution 15 - Visual StudioStarShineView Answer on Stackoverflow
Solution 16 - Visual StudioMorrisView Answer on Stackoverflow
Solution 17 - Visual StudioPavel PView Answer on Stackoverflow
Solution 18 - Visual StudioThorarinView Answer on Stackoverflow
Solution 19 - Visual StudioKon RadView Answer on Stackoverflow
Solution 20 - Visual StudioSteve In COView Answer on Stackoverflow
Solution 21 - Visual StudioryanwebjacksonView Answer on Stackoverflow