Is there any easy to follow tutorial for debugging Java / J2EE applications in eclipse? A step by step guide on how to check for unchecked and checked exceptions? I have been trying to find on the internet, but to no use.
views:
37answers:
2To add a Java Exception Breakpoint: Select the "Breakpoints" view in the Debug perspective and click on the view toolbar button for exception breakpoints (or choose Run->Add Java Exception Brekakpoint). In the next dialog, type the name of the exception (camel case is support, simply type NPE if you want to catch NullPointerExceptions, you'll get a list matching items), select it from the list and press OK. C'est ca.
You can activate/deactivate this special breakpoint from the Breakpoints view like normal breakpoints.
More fun: right click on a breakpoint entry in the Breakpoints view and choose "Breakpoint Properties". There you can add extra conditions, like 'only break when myCustomString.equals("WTF")' or something else. But conditional breakpoints will slow down the application significantly, only activate them if you really need them.