Visual Studio - 突然无法调试测试 [英] Visual Studio - suddenly cannot debug tests
问题描述
我不确定我做了什么,但突然之间,我的 Visual Studio 2012 将无法调试任何测试.
I'm not sure what I did, but all of a sudden, my Visual Studio 2012 will not debug any tests.
如果我从 Test Explorer 中选择一个测试并告诉它运行,它只会在测试输出"窗口中输出:
If I select a test from the Test Explorer and tell it to run, it simply outputs this in the Test Output window:
> ------ Discover test started ------
> ========== Discover test finished: 29 found (0:00:01.3371755) ==========
> ------ Run test started ------ Process with an Id of -1 is not running.
> ========== Run test finished: 0 run (0:00:01.4711861) ==========
这到底是什么意思?!这样做了几次后,错误变为:
what the heck does that mean?! After doing this a few times, the error changed to:
The Operation was Cancelled
我确定没有这样做.
它对列表中的每个测试都执行此操作.
It's doing this on every test in the list.
但是,我可以毫无问题地运行测试,并且它们通过了...但我无法调试测试.
however, I can RUN the tests no problem, and they pass... but I cannot debug the tests.
我可能做了什么?我没有主动进入任何设置并更改任何内容,也许是某个地方的误点击,但在哪里?
What might I have done? I did not actively go into any settings and change anything, perhaps a stray click somewhere, but where?
推荐答案
我今天遇到了这个.我尝试关闭解决方案,但没有奏效.我的错误是我将解决方案设置为发布模式而不是调试模式.我将它设置为调试,然后它按预期工作.
I encountered this today. I tried closing the solution but it didn't work. My mistake I set my solution to Release Mode instead of Debug Mode. I set it to Debug then it worked as expected.
我正在使用 VS 2015 专业版.
I'm using VS 2015 professional.
这篇关于Visual Studio - 突然无法调试测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!