Debugging an Azure web role started with csrun.exe

徘徊边缘 提交于 2019-12-11 06:19:23

问题


I have a Visual Studio solution that has a cloud project with one web role (containing an ASP.NET MVC Web API). If I hit F5, the Azure emulator is started and I can debug the web role fine.

I also have a test project that contains integration tests, to test the web api end to end. In the AssemblyInitialize operation, I use csrun.exe to deploy and start the Azure emulator like:

"C:\Program Files\Microsoft SDKs\Windows Azure\Emulator\csrun.exe"
  ..\..\..\..\Sources\Cfg.Mgp.Infrastructure.Cloud\csx\Debug
  ..\..\..\..\Sources\Cfg.Mgp.Infrastructure.Cloud\bin\Debug\ServiceConfiguration.cscfg
  /useiisexpress

So if I start the tests, the Azure emulator is ready and tests are executed fine. This all works.

However, if I want to debug this starting from my integration tests, the breakpoints in the Web API are not hit (but it is executed fine). I tried attaching the debugger to IISExpress, WaHostBootstrapper and other processes, but nothing works.

Does anyone have any idea how to debug a web role if the Azure emulator is started with csrun.exe?

(Remark: if I hit F5, a browser is launched; and if I then run the integration tests the breakpoints in the web role are hit fine.)

来源:https://stackoverflow.com/questions/18272952/debugging-an-azure-web-role-started-with-csrun-exe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!