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 image description here

enter nullpointerexception , press ok button.

enter image description here

make sure any exception not checked.

now run program right-clicking inside main method , select debug 'someclass.main()'

enter image description here

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

enter image description here


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -