Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2012 "Unable to start debugging"

I am trying to host web services with IIS Express on my local machine. I can start debugging one time. Every time after that I get a dialog box with "Unable to Start Debugging" whenever I try to run the project. If I shut down VS 2012 then open back up it works one more time. I see the issue in this post. I believe it has something to do with my password changing a few days ago. However, I can't find where my credentials are stored and I have no idea how to change this configuration. Please help!

UPDATE:

Turns out the same thing happens if I try to run a local console app. This means (I think) it is a VS setting somewhere. I was having to shut down VS and restart it every time. However, I did find that if I shut down these tasks and then debug it works:

enter image description here

Any ideas?

like image 695
mac Avatar asked Oct 30 '22 02:10

mac


1 Answers

It appears from your screenshot that IIS Express is not shutting down when you stop debugging. This is actually a setting in Visual Studio called “Enable Edit and Continue”. When enabled, IISExpress will close when Debugging ends and if disabled IISExpress will remain open.

This setting is normally set on by default in Visual Studio 2013, but actually defaulted to off in versions prior, including 2012, which you state you're using. You probably want it ON.

To adjust globally:

  1. Open Options dialog box by clicking Tools -> Options
  2. Click Debugging -> Edit and Continue
  3. Toggle "Enable Edit and Continue"

You can also turn adjust on a per project basis.

  1. Open properties for web project
  2. Click Web tab
  3. Toggle Enable Edit and Continue" under Debugger at the bottom of this page

Further reading on MSDN here: https://blogs.msdn.microsoft.com/webdev/2013/07/11/enable-edit-and-continue-debugging-option-is-now-on-by-default-for-new-web-applications-in-vs2013-preview/

like image 53
HBomb Avatar answered Nov 15 '22 06:11

HBomb