Visual Studio 2010测试没有进入异常调试器 [英] Visual Studio 2010 test not entering debugger on exception

查看:178
本文介绍了Visual Studio 2010测试没有进入异常调试器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



当我在调试模式下运行测试时,我试图用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屋!

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