如何告诉调试器忽略打破抛出的异常? [英] How to tell the debugger to ignore breaking on thrown exceptions?

查看:391
本文介绍了如何告诉调试器忽略打破抛出的异常?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我确认与第三方库输入一个TextBox。然而,这个库抛出自定义异常时,语法不正确。这是不是一个真正的大问题,但在调试的。

在调试,因为在文本框中的文本将永远是最初错误的(我仍然打字吧),调试器将每封信后,直到它是正确的,这是我验证每个字母真的很烦停止。

我怎么能告诉调试器在这些自定义异常不破?

P.S。我已经尝试筛选调试 - >例外(在公共语言运行库异常添加),但这并没有为我工作。调试器仍停止在该库被称为行了。

P.P.S。使用Visual Studio 2010。

答:

在结束我非常接近我的PS。这是一个pretty愚蠢的错误:我曾在命名空间中一个错字。由于流行克特林和Madhur阿胡加指点出来!


解决方案

  

有处于例外窗口
  Visual Studio中...尝试按Ctrl-Alt键-E时,
  调试并点击时抛出
  复选框要异常
  停止


您正在寻找此相反:
<一href=\"http://stackoverflow.com/questions/116896/visual-studio-how-to-break-on-handled-exceptions\">Visual工作室:?如何在处理的异常打破

I have a TextBox in which I validate the input with a third party library. However, this library throws custom exceptions when the syntax is incorrect. This is not a real big deal, except for when you are debugging.

When debugging, since the text in the TextBox will always be initially wrong (I am still typing it), the debugger will stop after each letter until it is correct, which is really annoying as I validate with each letter.

How can I tell the debugger to not break at these custom exceptions?

P.S. I have already tried to filter the Debug -> Exceptions (added it in Common Language Runtime Exceptions), but this did not work for me. The debugger still stops at the line where the library is called.

P.P.S. Using Visual Studio 2010.

Answer:

In the end I was very close with my PS. It was a pretty silly mistake: I had a typo in the namespace. Thanks to Pop Catalin and Madhur Ahuja for pointing it out!

解决方案

There is an 'exceptions' window in Visual Studio ... try Ctrl-Alt-E when debugging and click on the 'Thrown' checkbox for the exception you want to stop on

You are looking for reverse of this: Visual Studio: How to break on handled exceptions?

这篇关于如何告诉调试器忽略打破抛出的异常?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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