Visual Studio-突然无法调试测试 [英] Visual Studio - suddenly cannot debug tests

本文介绍了Visual Studio-突然无法调试测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不确定自己做了什么,但是突然之间,我的 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 中选择了一个测试并告诉其运行,它只会在"Test Output"窗口中将其输出:

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?

推荐答案

我今天遇到了这个问题.我尝试关闭解决方案,但没有成功.我的错误是我将解决方案设置为发布模式"而不是调试模式".我将其设置为Debug,然后按预期工作.

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 Professional.

I'm using VS 2015 professional.

这篇关于Visual Studio-突然无法调试测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆