简体   繁体   English

Visual Studio 2012“无法启动调试”

[英]Visual Studio 2012 “Unable to start debugging”

I am trying to host web services with IIS Express on my local machine. 我正在尝试使用IIS Express在本地计算机上托管Web服务。 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. 如果我关闭VS 2012然后打开备份它再次工作。 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. 这意味着(我认为)它是一个VS设置。 I was having to shut down VS and restart it every time. 我不得不关闭VS并每次重新启动它。 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. 从屏幕截图中可以看出,当您停止调试时,IIS Express不会关闭。 This is actually a setting in Visual Studio called “Enable Edit and Continue”. 这实际上是Visual Studio中的一个名为“启用编辑并继续”的设置。 When enabled, IISExpress will close when Debugging ends and if disabled IISExpress will remain open. 启用后,IISExpress将在调试结束时关闭,如果禁用,IISExpress将保持打开状态。

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. 此设置通常在Visual Studio 2013中默认设置为开启,但实际默认为先前版本(包括2012年,您声明正在使用的版本)中的关闭 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 打开Web项目的属性
  2. Click Web tab 单击Web选项卡
  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/ 在MSDN上进一步阅读: https//blogs.msdn.microsoft.com/webdev/2013/07/11/enable-edit-and-continue-debugging-option-is-now-on-by-default-for-新的Web应用功能于vs2013预览/

First Check the Identity settings 首先检查标识设置

Update your credentials in the "Identity" setting, under IIS/Application Pools. 在IIS /应用程序池下的“身份”设置中更新凭据。

if your password had recently changed, the "Identity" might still set to your old credentials. 如果您的密码最近已更改,“身份”可能仍设置为您的旧凭据。

OR 要么

Reset Visual Studio Settings 重置Visual Studio设置

reset visual studio settings and restart it again. 重置visual studio设置并重新启动它。

  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 或者检查真正重置VS.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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