msvsmon.exe crashed when debugging

27,010

Solution 1

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

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

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

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

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.

Share:
27,010
Admin
Author by

Admin

Updated on July 09, 2022

Comments

  • Admin
    Admin almost 2 years

    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 ?

  • hdoghmen
    hdoghmen over 8 years
    Removing break points and Restarting Visual Studio did solve my problem
  • Grant
    Grant about 8 years
    Have also experienced msvsmon.exe crashing in VS2015 Update 1. Deleting breakpoints solved the issue for both local and remote debugging.
  • odyth
    odyth about 8 years
    my host file looked correct, but as soon as i uninstalled my vpn software it started working again.
  • bweber
    bweber almost 8 years
    Indeed, after uninstalling the Astrill VPN Software it started working again for me. Weird.
  • Omer Raviv
    Omer Raviv over 7 years
    @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.
  • csrowell
    csrowell over 7 years
    Yep, the Early Access Preview version did resolve the issue.
  • silkfire
    silkfire over 7 years
    @OmerRaviv Uninstalled OzCode and the problem disappeared.
  • Omer Raviv
    Omer Raviv over 7 years
    @silkfire Sorry to hear that. For the fix, please download the OzCode EAP version. More details about this version here.
  • Piotr Knut
    Piotr Knut over 7 years
    I do not use VPN, but after editing the hosts file, the problem disappeared. Thanks. 127.0.0.1 localhost ::1 localhost
  • Piotr Knut
    Piotr Knut over 7 years
    It is better, but still a problem occurs. I can sometimes debug.
  • Piotr Knut
    Piotr Knut over 7 years
    After install Microsoft .NET Core Tools (Preview 2) is work properly. Breakpoint work as should.
  • MAG
    MAG over 7 years
    What worked for me is 1) Deleting all breakpoints 2) run one time the exe 3) then putting back few . This worked for me.
  • codekaizen
    codekaizen over 7 years
    Worked for me, VS 2015 Update 3.
  • Szybki
    Szybki over 7 years
    Amazingly, this helps. Anybody knows what's causing the problem?
  • Matt
    Matt almost 7 years
    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.
  • vinibrsl
    vinibrsl over 6 years
    Worked for me, VS 2017 15.3.3.
  • ryanwebjackson
    ryanwebjackson over 6 years
    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.
  • ryanwebjackson
    ryanwebjackson over 6 years
    I have no breakpoints and am getting this issue. VS 2017 15.5.4
  • Przemek
    Przemek over 5 years
    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.
  • Dai
    Dai over 4 years
    This worked for me in Visual Studio 2017 15.9.18. I also deleted all of my saved breakpoints too.
  • Jan
    Jan about 4 years
    Deleting all breakpoints didn't work for me using VS2019. I also had to restart VS2019.
  • S.H.
    S.H. over 3 years
    Thank you! Dast ist fantastish! (Excuse me my Dutch)
  • aonepathan
    aonepathan over 3 years
    Same as Jan. Worked for me using VS 2019, deleting all breakpoints and then restarting afterwards. If I didn't restart issue would persist.
  • Michael M
    Michael M about 3 years
    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.