Monday, 19 January 2015

Tip of the week: Eclipse breakpoints at exceptions

Have you ever tried to locate and exception being thrown at your code but you can't get there? OR maybe you get the exception's class but not the place wherre is thrown.

Eclipse has a great tool for this matter. Just open up the Breakpoints view (Ctrl + 3 and type Breakpoints)

In the toolbar there is this icon. Click on it.

The exception breakpoint windows give you the chance to tell eclipse to stop at any exception of a type. You can type the class of exception you want.

The two options at the bottom allows you to set if the debbuger should stop on caught exceptions (in a catch block), on uncaught exceptions (useful for those RuntimeExceptions)  or both.

Happy debbuging!

No comments:

Post a Comment