寻找异常的起源 [英] Finding the origin of an exception

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

问题描述

大家好,

我想从我扔进我腿上的一些旧垃圾中弄清楚.这段代码的问题在于,原始开发人员似乎在代码失败的任何地方都进行了try/catch,并且根本不可能找到其中一些异常发生的地方.有什么方法可以快速转到导致异常的语句?

干杯!

Hi all,

I''m trying to make sense out of some old junk I''ve got thrown into my lap. The problem with this code is that it seems like the original dev just threw in a try/catch wherever the code failed, and it''s just impossible to find where some of these exceptions occurred. Is there any way to quickly go to the statement that resulted in the exception?

Cheers!

推荐答案

在调试| 异常"对话框中,您可以指定调试器应如何处理异常.您可以选择在引发特定异常时闯入调试器.

因此,如果您知道要查找的类型,那可能就是这样做的一种方法.
In the Debug | Exceptions dialog, you can specify how exceptions should be treated by the debugger. You can chose to break into the debugger when a specific exception is thrown.

So if you know what type to look for, that could be one way of doing it.


谢谢-下次会出现这种情况的时候尝试一下:)
Thanks - will try that next time something crops up :)


这篇关于寻找异常的起源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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