简体   繁体   中英

How to watch for NullPointerEx in Eclipse using Debbuger Add Watch Expression feature?

Hi how can I use that Add Watch Expression of eclipse to watch for any NullPointerException s that my application can throw ?

I saw a Guy once adding some code into that feature and with that he made eclipse debugger to stop when any NullpointerEx was "born".

I would like to learn how to do that.

You don't use 'watch expression'. Go to the "breakpoints" view and add an exception breakpoint for NullPointerException .

I don't know how to do this using Add Watch Expression, but you can set breakpoints on certain types of exceptions being thrown. Perhaps this is what you're looking for?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM