Visual Studio 2015 debugging slow to load - visual-studio

Just suddenly over the past day I'm having an issue with Visual Studio 2015 where it takes an age to start debugging anything. Even a simple console application with one line will take over 3 minutes just to start. Running without debugging is normal.
Things I've tried:
Enable Just My Code checked under General Debugging options
Created local cache of Symbols
Removed all Breakpoints
Deleted all user temp files
Reinstalled Visual Sudio
Nothing has had any effect. When starting debugging it just hangs and VS becomes unresponsive for a couple of minutes until it then will start debugging. Once running it is fine. I don't understand why this has suddenly just started happening.
My company have recently pushed McAfee out to all machines, but this has been running on mine for a while now without any issue so not sure why it would suddenly be causing this now. Has anyone else experienced this and if so how did you fix it?

I have disabled Just my code and disabled also diagnostic tools during debug in Tools->settings->debug

Related

Debug randomly acting slow in Visual Studio

Yesterday i had worked on this solution and ran it with debugging enabled perfectly well on two systems yesterday, and today i tried debugging it and it took about 15 minutes for the window to even appear. I didn't change any settings, change any code, etc. Ran it with the exact same build as the day before, on a different system yes, but both systems ran the code perfectly fine yesterday. Now they take an extremely long time to even start and once finally started it is unusably slow in debugging mode. Note, this doesn't happen when i disable debugging. I've tried multiple things, such as cleaning, rebuilding, deleting .suo files, and more. I am wondering how to fix this problem which i think primarily has to do with visual studio's debugger, my project, or my solution, as this doesn't happen with any other projects.
I am using Visual Studio 2017, and this slow debugging is only the case for this project.
I figured it out accidentally when changing the 'enable native debugging' setting on. Having it on was making the debugger load a lot of .pdb files that i didn't need.

Visual Studio 2013 freezes when ending debugging

Out of the blue Visual Studio started locking up on me for 2-5 minutes at a time when ending debugging (after a test run, in my case). CPU usage is high (maxing out one core). If I leave it, eventually it will unfreeze and continue as normal.
I've tried a number of solutions but nothing seems to help.
I don't have any add-ons installed
I tried restarting Visual Studio and my PC
I rebooted my PC and ran chkdsk /F
I don't have Show All Files turned on in the Solution Explorer
Turned out to be stupidly simple: I saw a suggestion somewhere (can't remember where, sorry) to clear all breakpoints with Ctrl+Shift+F9. I did that and restarted the IDE for good measure, and so far it's been running fine.

msvsmon.exe crashed when debugging

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 ?
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
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:
If I add msvsmon.exe process to windows defender exclusions list, then the problem disappears.
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.
Fixed by changing Options->Projects and Solutions->Web Projects -> Use 64bit version of IIS......... to False.
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.......
I just experience this with VC2017 Community Edition 15.7.2. Turning off the Microsoft Symbol Server lookup while debugging fixed it for me.
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.
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.
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.
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.
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.
I deleted all my watch variables. That fixed the problem for me.
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).

Visual Studio Hangs in debug?

For the past couple of days, Visual Studio 2012 and 2013 have been hanging during debug mode. Most of the time, i dont get this issue until further into my project. When i press the Start Button, everything continues as normal, but then hangs with this message at the bottom of visual Studio statusBar.
Inside Task Manager, when i try to force taskkill, or end process/process tree, this continues to stay present in my running processes.
Even after a reinstall, nothing seems to help it. I did see somewhere on the Microsoft Developer forums where a person was told it was something to do with the windows sybmol server?. What do i need to do to fix this issue i am having?
After this occurs once, i am forced to reboot my computer. Even if i open Visual Studio after this happens, it still has the same issue.

Visual Studio 2008 crashes and has to be restarted when I start the debugger

My Visual Studio crashes each time I try to debug my ASP.net application.
I've been working on this application for months and only now has this issue come up. I've tried rebooting to no avail.
When I press F5, Visual Studio immediately freezes up and displays no error message. I also get the exact same behavior when I use the "Attach to Process" option to start the debugger.
The problem happens only with a particular application I'm working on. If I create a new project, I can debug that project, but as soon as I open up my original project, it's the same story all over again.
Also, I should point out that the "development server" icons appear in the System tray and do not disappear after the frozen Visual Studio 2008 is terminated.
Has anyone else encountered this?
I had the sysadmin re-install VS2k8 for me. That fixed the problem.
For some odd reason, the uninstall process took a very long time that surprised even the sysadmin who uninstalled and reinstalled it for me. I wonder if that could have anything to do with the problem.
Anyhow, the reinstall got me up and running again.

Resources