java - How to use Intellij Idea's exception breakpoints -
this seems dumb question, can't figure out how debug exceptions in intellij idea. googling not either.
i try create exception breakpoints. when idea breaks, expect give me call stack showing leads method throws exception automatic watch window visual studio's debugging tool. instead shows kinds of garbled message launcher or classloader, no signs of actual exception during runtime.
so how idea's exception breakpoint supposed used?
it works , don't know kind of problems have launcher or classloader. have selected catch any exceptions , means catch kinds of exceptions during startup , class loading well. have make specific choices exceptions catch, or go through them until exception caught.
anyhow show how set simple case , you'll see working well.
i have simple case nullpointerexception thrown.
first you'll have set exception breakpoint.
enter view breakpoints... window pressing ctrl+shift+f8. press little + sign in upper left corner.

enter nullpointerexception , press ok button.

make sure any exception not checked.
now run program right-clicking inside main method , select debug 'someclass.main()'

and watch when exception caught , have things expected call stack , watch window.

Comments
Post a Comment