检查Eclipse调试器中的当前异常? [英] Inspect current exception in Eclipse debugger?

查看:107
本文介绍了检查Eclipse调试器中的当前异常?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果Java应用程序引发未处理的异常,则会导致Eclipse在此时断开。有没有办法检查当前的例外情况?基本上,来自MSVS的 $ exception

If a Java application throws an unhandled exception, it causes Eclipse to break at that point. Is there a way to inspect the current exception? Basically, $exception from MSVS?

推荐答案

在使用异常断点时发生,在这种情况下,您无法访问异常变量,并且无法在变量视图中检查它。

In think the problem described occurs when making use of Exception breakpoint, in which case you don't have access to the exception variable and can't inspect it in the variables view.

我在以下帖子中找到了一个解决方案的问题: Eclipse中的异常断点 - 如何检查异常对象?

I found a "solution" to this problem in the following post: Breakpoint at exception in Eclipse - how to examine Exception object?

它是:


Eclipse首选项中有一个可以检查抛出异常的
的选项:

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

检查Java - >调试 - >在异常情况下暂停时打开弹出窗口

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

使用此选项将弹出一个允许检查
异常的弹出窗口。

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

奇怪的是,这个选项没有被defa检查这是非常有用的
有用!

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

这篇关于检查Eclipse调试器中的当前异常?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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