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

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.

Related

Visual Studio JIT Debugger hangs

I've always used System.Diagnostics.Debugger.Launch() as a quick way to debug web services. I get a dialog asking me to choose a debugger, I pick "New instance of Visual Studio" and it fires up VS and lets me step through the code.
That has suddenly stopped working. Now I get the dialog, and choose Visual Studio, and the VS splash screen appears, and then it just hangs. The dialog window says "Not Responding" and I have to force it to close. Even then, a VS instance is left hanging around in Task Manager and I have to kill it manually.
I've tried repairing Visual Studio, and uninstalling and reinstalling Visual Studio, and nothing fixes it.
In desperation, I completely flattened my PC and reinstalled everything from scratch. It lasted about a day and then JIT debugging started hanging again. I was on Windows 10 and Visual Studio 17.4.1 before, and I'm on Windows 11 and Visual Studio 17.4.2 now.
To make sure that it's not a problem with some particular code, I created a one-line console app System.Diagnostics.Debugger.Launch(); and that crashes just the same.
Has anybody experienced anything similar, or have any idea what could be going wrong?
I don't know why that fails, but I suggest to attach to a running instance of Visual Studio instead. Start Visual Studio first, and then when the "launch debugger" window appears, select the running VS instance. Preferably, you should even open the correct solution/project first. If you attach to that instance, all your source code and the project structure is available for debugging.
Another alternative: Instead of using Debugger.Launch(), use a code snipped such as
while (!Debugger.IsAttached)
{
Thread.Sleep(100);
}
at the beginning of your program and attach the debugger from within Visual Studio (using the menu option Debug->Attach to process)
I had the same exact problem and after updated to VS version 17.4.4 the issue disappeared. All good now.

"Opening and creating websites on iis requires running visual studio under an administrator account"

I'm seeing this error in a pop-up window when attempting to run/debug my web project from Visual Studio
The following error occurred when trying to configure IIS Express. Opening and creating websites on iis requires running visual studio under an administrator account
This happened completely out of the blue. One second I was working as normal, regularly going in and out of debug in my browser, then this error pops up. It happens when attempting to run any web project, and it doesn't matter if it's in debug, release mode or what.
Stuff I've tried:
Run Visual Studio as Administrator
Uninstall/Reinstall IIS Express (via "Turn Windows Features On or Off" in Control Panel)
Update Visual Studio
Delete project's .vs folder
But still the error persists.
Is there anything else I can reinstall, update or otherwise check?
Thanks.
Solved it by going through a day of hell, and to be honest the 'solution' was very brute force...
TL;DR: Fully deleting and reinstalling Visual Studio seemed to do the trick.
Since the usual methods weren't working, I tried a full reinstall of Visual Studio. That didn't help. I then tried a System Restore. That made everything far worse, with my project showing about 500 error messages!
I then undid the System Restore, completely deleted all traces of Visual Studio from my computer, reinstalled everything, then tried VS2019 preview edition, tried 2017 edition again, uninstalled and reinstalled NetCore 2.0, 2.1, 2.2... all just to get around the minefield of error messages I'd created for myself.
In the end I just needed to do a full NuGet clear and restore then run dotnet restore --force in the NPM console, after which all those error messages were gone. As well as this, the original IIS Administrator error was gone too, presumably fixed via the original reinstall of Visual Studio.
Lost a whole day to this quagmire.
Downloading & Installing IIS Express from Microsoft worked for me. No need to update VS or remove/re-add the project.

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 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 when starting to debug

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.

Resources