Visual studio 2008 crashes when starting to debug - visual-studio

When I press F5, everything compiles fine, but when the app is to be started, VS crashes, showing the "Just in time debugger" dialog.
More than one (similar) solution has this problem. A new solution containing just a form, works. This problem started out of the blue, I have made no changes to the environment as far as I can understand.
I can start the app without debugging (ctrl+F5), and then attach the debugger.
I'm using VS 2008 sp 1.

Never seen this issue, have you tried turning off all your plug-ins like reSharper, CodeRush, etc.?
Update: When worst comes to worst I usually try this command line.
devenv.exe /ResetSettings
devenv.exe /ResetSkipPkgs
devenv.exe /Setup
try all these you can do them all at once or do them individually it is up to you. But be aware that you will be deleting all your settings that you have customized in to Visual Studio, so you may want to back them up.
The last thing you can try is this, to see if the problem is with something weird that is running.
devenv.exe /SafeMode
Starts Visual Studio in safe mode, and loads only the default environment and services, and shipped versions of third-party packages.

I've found the problem now. I had "Step framework source" enabled, which somehow broke the debugger (strange though, because it usually works). Turning that off, made me debug as usual again.

If you have undocked windows in debug layout search KB960075 on code.msdn.microsoft.com (can't add hrefs).

Do you have CLI.exe error issues? Check your event log. I've had the same issue and simply re-staged my machine out of panic since I was so near a deadline. I assumed that it was an issue with the registry and couldn't find an answer.

try repair or reinstall, don't waste time findin' the reason of the problem

I had the same problem, out of the blue the IDE would crash when I started to debug. Happened with any existing project that I opened, even the visual studio samples. I created a new project, just a blank dialog, ran it, and all was good. After that, the problem went away and I was able to debug again.

This happened to me just now, after my computer rebooted itself last night. When I was pressing F5 the app started but instantly shut down and the VS IDE crashed.
To fix it: Debug->Delete All Breakpoints. It worked for me.

Related

Visual Studio Community 2015 won't start

When I try to start it. The loading screen flash by in 1 millisecond then dissapear. Iv'e tried the devenv.exe /Setup solution, but devenv.exe won't start either.
Don't know what to do! I think it has something with to do with devenv.exe. Because after I used the selector, it has been corrupt.
Assuming you've already tried the basics (turning it off and turning it back on again, etc.), you may want to try running it as administrator. Right-click>Run As Administrator
I've had some issues on and off with VS not always working for me unless I run as admin.
If that fails, you can repair the installation by going through the Programs and Features menu.

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 2010 hangs on attach to process / debugging

Whenever I try to debug a Visual Studio 2010 web project, VS hangs, and ultimately crashes. This happens if I try to start the project using F5, or through Attach to Process, before the process list even appears.
Hitting F5 in, for example, a Windows Form project works fine, but attach to process fails here too.
Any ideas on what can be causing this? Obviously attaching to the devenv.exe process won't work as I can't get the Attach to Process dialog to appear...
Oh, running W7 (x64), VS2010 SP1 (had same problems without SP1)
In Solution Explorer there is a Show All Files icon (highlighted in the photo below):
Make sure it's turned off,
When It's turned on, Visual Studio tries to index all the files in the solution and if you have a giant Solution it could take forever!
I hope this has helped someone :)
Have you recently installed Mono and/or Mono Tools for VS2010?
I found that to be the problem it my case. Not sure why, but it somehow got in the way.
Matthew
In my case hangs when executable type was not correctly set, ex. Managed v4.0 and trying to attach to Native.

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.

Debugging in visual studio 2008 freezes entire system

Any time i try to debug in visual studio 2008 my entire system will freeze whenever a breakpoint is hit.
I can move the mouse around and that remains responsive but nothing i click on does anything,
I can bring up the task manager but can't do anything with it and i am able to lock/unlock the machine.
I tried a fix that i found via google that suggested i disable advanced text services but it didn't work. I am using visual studio 2008 with SP1 running on Windows XP Pro, asking here is my last hope before formating/reinstalling so i hope someone can help me out.
I debug by running the application in debug mode, the freeze happens no matter what the project size and it seems as if it is just the entire GUI that freezes, the computer carries on working just fine i just can't do anything with it because the GUI is totaly unresponsive.
I found I only had this issue when I was using the keyboard to debug. If I used the toolbar debug buttons, I didn't have an issue.
To "fix" this, I set the LowLevelHooksTimeout to 300ms (from 5000ms). You may need to add the DWORD if it isn't already there.
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\Control Panel\Desktop\LowLevelHooksTimeout
HKEY_CURRENT_USER\Control Panel\Desktop\LowLevelHooksTimeout
Restart after making this change for good measure.
How big is the project you are running? When I did a Find last night on a huge open source project, I got kind of the same behavior.
Also, did you try Uninstalling just VS2008, then Reinstalling with only the options you use.
Have you tried disabling "Call ToString()" debugger option? This is ON by default, and is known to deadlock.

Resources