Visual Studio 2010测试没有进入异常调试器 [英] Visual Studio 2010 test not entering debugger on exception
问题描述
当我在调试模式下运行测试时,我试图用Visual Studio 2010调试一个C#应用程序,使用Microsoft.VisualStudio.TestTools.UnitTesting。并且测试引发异常,它不会弹出我的调试器,它只是退出并告诉我一个未处理的异常被抛出。
有一种方法可以让它在调试应用程序时发生未处理的异常时一样打开调试器吗?
Visual Studio允许您定义调试器应该捕获什么样的异常。转到Debug-> Exceptions或ctlr-alt-e。
然后,您可以确保您要捕获的异常已启用。
I'm trying to debug a C# app with Visual Studio 2010, using Microsoft.VisualStudio.TestTools.UnitTesting.
When I run a test in debug mode, and the test throws an exception, it doesn't pop me in to the debugger, it just exits and tells me an unhandled exception was thrown.
Is there a way I can get it to open the debugger the same way it does when an unhandled exception occurs while debugging an application?
Visual Studio allows you to define what kind of exceptions should be caught by the debugger. Go to Debug->Exceptions or ctlr-alt-e.
Then you can make sure the exception you want to catch is enabled.
这篇关于Visual Studio 2010测试没有进入异常调试器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!