歇在掷异常被捕获 [英] Break at throw for exception that is caught

查看:106
本文介绍了歇在掷异常被捕获的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在VS调试,未捕获的异常导致程序突破该点的例外是掷(或足够接近),并在让你看所有的堆栈帧并有局部变量到这一点的状态



有没有办法得到这个相同的结果(在罚球打破),但一个例外在特定点被抓住?我没有兴趣做这适用于所有的异常,甚至给定类型的所有的异常(即可以得到没用真正的快),但如果我能为一个try或catch块做,我会很高兴。



有些关联:




< DIV CLASS =h2_lin>解决方案

请问调试 - >例外对话框,你想要做什么?您可以选择哪些异常,会导致VS打破,不管他们是否被发现或没有。我不知道的方式来为仅代码,仅根据抛出的异常的类型的某一部分做到这一点。


In the VS debugger, un-caught exceptions result in the program breaking at the point the exception is throw (or near enough) and in a state that lets you look at all the stack frames and there local variables up to that point.

Is there a way to get this same result (break at throw) but for an exception is caught at a particular point? I'm not interested in doing this for ALL exceptions or even all exception of a given type (that could get useless real quick) but if I could do it for a single try or catch block I'd be happy

somewhat related:

解决方案

Does the Debug -> Exceptions dialog do what you want? You can select which Exceptions that will cause VS to break, regardless of whether they are caught or not. I don't know of a way to do this for only a certain part of the code, only based on the type of the exception thrown.

这篇关于歇在掷异常被捕获的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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