简体   繁体   中英

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:

在此输入图像描述

Any ideas?

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/

First Check the Identity settings

Update your credentials in the "Identity" setting, under IIS/Application Pools.

if your password had recently changed, the "Identity" might still set to your old credentials.

OR

Reset Visual Studio Settings

reset visual studio settings and restart it again.

  1. On the Tools menu, click Import and Export Settings.
  2. On the Welcome to the Import and Export Settings Wizard page, click Reset all settings and then click Next.
  3. If you want to save your current settings combination, click Yes, save my current settings, specify a file name, and then click Next.

—or—

If you want to delete your current settings combination, choose No, just reset settings, overwriting my current settings, and then click Next. This option does not delete default settings, which will still be available the next time you use the wizard.

  1. In Which collection of settings do you want to reset to, select a settings collection from the list.

  2. Click Finish.

OR Check Truely Reset VS

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM