简体   繁体   English

Visual Studio 2013 Azure项目:无法开始调试

[英]Visual Studio 2013 Azure project: Unable to start debugging

I have an Azure MVC project, and when I try to debug it, it hangs at "Starting the role for the application in the Microsoft Azure compute emulator..." 我有一个Azure MVC项目,当我尝试对其进行调试时,它挂在“正在Microsoft Azure计算模拟器中启动应用程序的角色...”处。

开始角色

After a while, if I try to hit the debug button again, it gives the error "The debugger cannot continue running the process. Unable to start debugging." 过一会儿,如果我尝试再次按下调试按钮,则会出现错误“调试器无法继续运行该进程。无法开始调试。”

无法调试

Any idea what the problem could be? 知道可能是什么问题吗? The Azure storage emulator is running when this happens. 发生这种情况时,Azure存储模拟器正在运行。

There are various things that can cause this and they are not all easy to find! 导致这种情况的原因有很多种,而且并不容易找到! It can be caused by a mismatch between the version of Azure tools referenced in the project and that installed on your PC. 这可能是由于项目中引用的Azure工具版本与PC上安装的Azure工具版本不匹配所致。

I have had to remove everything related to Azure once and reinstall from scratch! 我必须删除与Azure有关的所有内容,然后从头开始重新安装!

Another potential problem is if your WebRole.OnStart method keeps erroring, in which case, Azure will attempt to continually restart it and that can carry on for a long time. 另一个潜在的问题是,如果您的WebRole.OnStart方法始终WebRole.OnStart ,在这种情况下,Azure将尝试持续重新启动它,并且该过程可能会持续很长时间。 If this happens, it should eventually tell you that the roles are taking too long to start. 如果发生这种情况,它最终应该告诉您角色开始花费的时间太长。

There can be problems if you are trying to use IIS instead of IIS Express, I have never got full IIS to work with the Azure debugger. 如果您尝试使用IIS而不是IIS Express,可能会出现问题,但我从来没有完整的IIS与Azure调试器一起使用。

Try building a simple Azure app that references a default MVC app as a way to make sure it is not caused by mistakes you have made in your code or configuration. 尝试构建一个引用默认MVC应用程序的简单Azure应用程序,以确保它不是由您在代码或配置中所犯的错误引起的。 Good luck! 祝好运!

Not sure if this is your exact issue or not but I found the following which fixed my problem: https://stackoverflow.com/a/35407737/1399978 . 不知道这是否是您的确切问题,但我发现以下内容解决了我的问题: https : //stackoverflow.com/a/35407737/1399978 Issue is due to a specific Windows security update ( KB3126593 ). 问题是由于特定的Windows安全更新( KB3126593 )引起的。 Uninstall the update an everything works as it should. 卸载更新,一切正常。 Hope it helps. 希望能帮助到你。

I know this might not help a lot of people who have been having similar problems, but I just want to note here that my issues went away when I upgraded to Visual Studio 2015 and Azure 2.8. 我知道这可能对很多遇到类似问题的人没有帮助,但是我只想在此指出,当我升级到Visual Studio 2015和Azure 2.8时,我的问题就消失了。 Thanks for all the input, everybody! 谢谢大家的投入!

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

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