JDB stops on every exception - how to prevent this

不羁的心 提交于 2019-12-11 02:38:24

问题


I am using a jdb dubugger, and the problem with it that is stops on every caught exception, though I did not execute any catch .... statements. During class loading there are hundreds of them:

Exception occurred: java.io.FileNotFoundException (uncaught)"thread=Thread-2-EmulatorEngine", sun.misc.URLClassPath$JarLoader.ensureOpen(), line=634 bci=30

Is it any way to instruct jdb to skip these exceptions ?

PS. I have heard about IDE editors of cause. Have reasons to use jdb.


回答1:


I realized that I am not careful enough. JDB writes after launch these lines

Set uncaught java.lang.Throwable

Set deferred uncaught java.lang.Throwable

So, to disable that, I need to enter a command

ignore uncaught java.lang.Throwable



回答2:


If you're having the same issue as me, you need to use the fully qualified name of the class when defining the break point.

Example - Set break point in main method: stop in com.foo.bar.App.main

It may be that you are trying to set a break point for a class file different than the one you are debugging (which probably doesn't exist).



来源:https://stackoverflow.com/questions/11312882/jdb-stops-on-every-exception-how-to-prevent-this

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!