使用NUnit调试VS2012而不会抛出异常? [英] Debugging in VS2012 with NUnit without throwing exceptions?

查看:152
本文介绍了使用NUnit调试VS2012而不会抛出异常?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有NUnit运行到VS2012与NUnit测试适配器,我可以做运行所有测试很好,但如果我想要调试所有测试每次我打一个Assert它会抛出一个异常。如何使它不会抛出Asserts的异常?我做某件事情可怕的错误?

解决方案

当调试器被附加时,失败断言抛出异常。这是行为。无需担心。



您可以停止Visual Studio停止某些例外,进入Debug - > Exceptions ...和取消选中相应组中的所有或某些项目,从异常时断开:框中的抛出列中选中。




I have NUnit running into VS2012 with the NUnit Test Adapter and I can do Run All tests fine, but if I want to Debug All Tests every time I hit an Assert it throws an exception. How do I make it not throw exceptions for Asserts? Am I doing something horribly wrong?

解决方案

When the debugger is attached, failed asserts throw exceptions. This is intended behaviour. No need to be alarmed.

You can stop Visual Studio from stopping at certain exceptions, by going into Debug -> Exceptions... and unchecking all or some items in the appropriate group, from the column "Thrown" in the "Break when an exception is:" box.

这篇关于使用NUnit调试VS2012而不会抛出异常?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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