msvsmon.exe crashed when debugging
Asked Answered
E

24

60

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 ?

Employer answered 7/10, 2014 at 5:46 Comment(0)
B
63

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.

Boser answered 20/1, 2015 at 16:47 Comment(7)
Have also experienced msvsmon.exe crashing in VS2015 Update 1. Deleting breakpoints solved the issue for both local and remote debugging.Tingly
Worked for me, VS 2015 Update 3.Bwana
Amazingly, this helps. Anybody knows what's causing the problem?Unused
Worked for me, VS 2017 15.3.3.Pastor
I have no breakpoints and am getting this issue. VS 2017 15.5.4Azpurua
Deleting all breakpoints didn't work for me using VS2019. I also had to restart VS2019.Marrano
Same as Jan. Worked for me using VS 2019, deleting all breakpoints and then restarting afterwards. If I didn't restart issue would persist.Violet
M
27

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

Malm answered 13/10, 2016 at 21:36 Comment(4)
This worked for me in Visual Studio 2017 15.9.18. I also deleted all of my saved breakpoints too.Mosa
Thank you! Dast ist fantastish! (Excuse me my Dutch)Virchow
Unfortunately it did not work for me in Visual Studio 2019, with a JSON document 48 MB in size. Crashed with the same error message whether I enabled the 'Use Managed Compatibility Mode' or not, so I expect that there is a threshold that this option increases, but does not guarantee. Thanks for the suggestion though! I'll have to debug with a smaller subset of the document.Chuchuah
Your response gave me a clue. I had a variable to a class that was very large. Deleting that fixed the problem. When I try to add it back, the problem comes back.Telegraphese
B
13

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.
Bruiser answered 2/12, 2014 at 12:37 Comment(1)
Removing break points and Restarting Visual Studio did solve my problemDavidoff
M
12

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.

Morbific answered 16/12, 2016 at 20:41 Comment(1)
Wished I could upvote answers like this multiple times. Not the usual dumb guess work type of answers, but someone who CORRECTLY identified the problem, but did not just stop there and instead went the extra mile and reached out to Astrill. Solved my issues as well. Bravo.Dalton
W
7

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.

Washedout answered 11/9, 2015 at 7:45 Comment(6)
my host file looked correct, but as soon as i uninstalled my vpn software it started working again.Alpestrine
Indeed, after uninstalling the Astrill VPN Software it started working again for me. Weird.Dermatoid
I do not use VPN, but after editing the hosts file, the problem disappeared. Thanks. 127.0.0.1 localhost ::1 localhostReseta
It is better, but still a problem occurs. I can sometimes debug.Reseta
After install Microsoft .NET Core Tools (Preview 2) is work properly. Breakpoint work as should.Reseta
Given the context of my dev machine and its env, I was almost sure this was the problem, but edited the hosts file as mentioned, but debugging was not successful.Azpurua
P
5

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.

Pastypat answered 20/7, 2015 at 19:23 Comment(1)
What worked for me is 1) Deleting all breakpoints 2) run one time the exe 3) then putting back few . This worked for me.Geomorphology
C
2

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

Classy answered 29/1, 2016 at 19:14 Comment(0)
A
2

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.

Appleton answered 2/9, 2016 at 16:15 Comment(5)
@croswell Hi, OzCode CTO here - thanks a lot for letting us know about this issue! I've followed up on your bug report via email with a verison that should (hopefully) fix the issue.Hatti
Yep, the Early Access Preview version did resolve the issue.Appleton
@OmerRaviv Uninstalled OzCode and the problem disappeared.Uranic
@Uranic Sorry to hear that. For the fix, please download the OzCode EAP version. More details about this version here.Hatti
Now I get the same problem with version EAP v4. Tok me some time to figure it out, but after finding this here, I disabled OzCode and the error disappeared.Amadaamadas
C
1

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

Cobol answered 20/4, 2015 at 9:45 Comment(0)
C
1

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.

Coparcener answered 13/3, 2017 at 0:6 Comment(0)
K
1

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.

Knighton answered 18/10, 2017 at 15:33 Comment(0)
Z
1

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.

Zigmund answered 1/1, 2020 at 8:22 Comment(1)
That worked for me (VS2019 17.4).Photoluminescence
P
1

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.

Povertystricken answered 27/1, 2020 at 15:50 Comment(0)
R
1

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.

Ruthenious answered 18/11, 2021 at 20:55 Comment(0)
P
0

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

Paint answered 30/6, 2017 at 20:28 Comment(0)
J
0

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

Jerrine answered 27/11, 2017 at 6:30 Comment(0)
S
0

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

Stud answered 25/5, 2018 at 12:4 Comment(0)
C
0

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.

Cajuput answered 23/8, 2018 at 8:38 Comment(0)
K
0

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.

Kerril answered 17/2, 2021 at 0:5 Comment(0)
D
0

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.

Demanding answered 30/8, 2021 at 4:22 Comment(0)
B
0

This problem is at least 1 1/2 years old maybe more. Today is 6-11-22 and I have the problem in Ms Studio Pro 2022 with a fresh install of windows 11 not much of anything else in the computer. Then I uninstalled it and install Ms Studio Community 2022 put in 1 breakpoint at the beginning and I got the error.

Today 6-12-22 I reinstall Ms Studio Community 2022. For some reason I switch from x86 to x64 went through a about 1000 changes of errors and a crashed form1.resx file thank goodness for a backup I had or I'd be done again. anyways so far have several break points with no problems.

Brigadier answered 12/6, 2022 at 22:55 Comment(0)
T
0

I deleted all my watch variables. That fixed the problem for me.

Telegraphese answered 22/7, 2022 at 15:22 Comment(0)
J
0

try disabling the debugging option "Load debug symbols in external process (Native only)":

enter image description here

Jesselton answered 21/12, 2023 at 10:3 Comment(1)
Thank you for your interest in contributing to the Stack Overflow community. This question already has quite a few answers—including one that has been extensively validated by the community. Are you certain your approach hasn’t been given previously? If so, it would be useful to explain how your approach is different, under what circumstances your approach might be preferred, and/or why you think the previous answers aren’t sufficient. Can you kindly edit your answer to offer an explanation?Zoila
A
-3

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

Azpurua answered 21/1, 2018 at 23:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.