如何在Visual Studio 2008 Express中禁用异常助理和未处理的异常弹出窗口 [英] How to disable exception assistant and unhandled exception popup in Visual Studio 2008 Express

查看:175
本文介绍了如何在Visual Studio 2008 Express中禁用异常助理和未处理的异常弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio 2008 Express,并且正在编写单元测试,其中有许多预期的未处理异常。这会在调试器中运行这些测试时显示许多异常助手弹出窗口。

I am using Visual Studio 2008 Express and am writing unit tests where there are many expected unhandled exceptions. This cause numerous exception assistant popups to display when running these tests in the debugger.

我已经在VS选项中禁用了异常助手,但是会弹出一个不同的未处理的异常对话框。我知道有可能摆脱这些与Visual Studio专业版,但你怎么用快速版呢?

I have disabled the exception assistant in the VS options, but a different unhandled exception dialog pops up instead. I know it is possible to get rid of these with Visual Studio Professional, but how do you do this with the express edition?

顺便说一句,我使用 Assert.Throws 而不是 ExpectedException属性(NUnit),这导致这个,但是我想使用Assert.Throws。谢谢!

By the way, I am using Assert.Throws instead of the ExpectedException attribute (NUnit), which causes this, but I want to use the Assert.Throws instead. Thanks!

推荐答案

在调试菜单中,转到例外( Ctrl + Alt + 电子)。从这里可以告诉调试器在抛出异常时不会中断。只需取消选中所有的懒惰选项框,或者去挖掘您不希望的特定例外。

In the Debug menu, go to Exceptions (Ctrl+Alt+E). From here you can tell the debugger not to break when an exception is thrown. Just uncheck all the boxes for the lazy option, or go digging for the specific exceptions you don't want it to break on.

请注意,这可能不是在正常的调试情况下你想要发生什么,所以如果你试图调试某些东西,想要找到例外。

Note however, that this may not be what you want to happen under normal debugging situations, so don't forget to turn it back on later if you're trying to debug something & want to find the exception.

编辑:我的歉意,即使它在问题(包括标题)中写了几次,我失败了注意你正在谈论快递版...教我阅读这个问题。不确定上述是否在快递版本中,所以可能还是值得一试。

Edit: My apologies, even though its written several times in the question (including the title), I failed to notice you were talking about the express edition... teach me for skim reading the question. Not sure if the above works or not in express edition, so it might still be worth a try.

编辑2 :好的,看起来像例外对话框仍然可以在快递版中使用。

Edit 2: Ok, looks like the Exceptions dialog is still available in express edition.

这篇关于如何在Visual Studio 2008 Express中禁用异常助理和未处理的异常弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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