ami*_*t_g 19 asp.net visual-studio visual-studio-2012
在一些解决方案中,我们有ASP.NET/WCF Web项目和测试项目.一些测试针对ASP.NET开发Web服务器使用http://localhost:port/...
.在VS2010中,当ASP.NET/WCF Web项目正在调试时,测试运行器可以运行测试,如果Web项目中有任何断点,调试器将中断执行.这似乎已在VS2012中被禁用/删除.
调试ASP.NET/WCF Web项目(通过按F5或通过附加进程启动)时,将禁用TEST-> Run和TEST-> Debug子菜单.在VS2010中,只有Test-> Debug子菜单被禁用,而Test-> Run子菜单仍然启用.我们使用这种方式轻松调试Web项目中的服务.有什么方法可以恢复或解决这个问题?
在ASP.NET开发服务器上运行时调试似乎不适用于VS2012,或者至少我无法使其工作.
Aro*_*ers 12
In VS2013 the situation is the same: the options for running/debugging tests are greyed out while the project is being run/debugged. This is a shame especially for projects like web API's where tests for calling the API via HTTP (as opposed to creating an instance of the Controller class and circumventing any network traffic) are very useful as they are closer to what the end users of the API will experience.
As a workaround, you can either open the same solution in a separate instance of VS, or create a separate solution with the same projects, specifically for testing. Debug in the first VS instance, run tests in the second one.
如果您有一个WCF应用程序和测试调用它们的解决方案,您可以通过调用Debug All Tests或Debug Selected Tests来调试应用程序,而无需先前的Start Debugging(F5).
将解决方案配置为在所有操作中设置为None的多个启动项目,并将WCF应用程序配置为启动操作不要打开页面.等待请求.使用此配置,如果选择" 调试所有测试"或" 调试所选测试",则会启动开发Web服务器.
归档时间: |
|
查看次数: |
7736 次 |
最近记录: |