加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Java > 正文

java – 检查Eclipse调试器中的当前异常?

发布时间:2020-12-15 00:27:27 所属栏目:Java 来源:网络整理
导读:如果一个 Java应用程序抛出一个未处理的异常,它会导致 Eclipse在那时中断.有没有办法检查当前的例外情况?基本上,MSVS的$异常? 解决方法 在使用Exception断点时,会发生描述的问题,在这种情况下,您无法访问异常变量,并且无法在变量视图中检查它. 我在以下帖
如果一个 Java应用程序抛出一个未处理的异常,它会导致 Eclipse在那时中断.有没有办法检查当前的例外情况?基本上,MSVS的$异常?

解决方法

在使用Exception断点时,会发生描述的问题,在这种情况下,您无法访问异常变量,并且无法在变量视图中检查它.

我在以下帖子中发现了一个“解决方案”这个问题:Breakpoint at exception in Eclipse – how to examine Exception object?

它是:

There is an option in the Eclipse Preferences that allows inspecting
of the thrown exception:

Check Java -> Debug -> Open popup when suspended on exception

With this option there will be a popup allowing inspection of the
exception.

Strange that this option is not checked by default as it is very useful !

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读