Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Break On Exception" in Eclipse/Android

I'm primarily a C#/VS dev, but will be debugging an Android application in the near future. I can't seem to find a setting in eclipse that will cause it to break into the debugger when an exception occurs (regardless of whether there is an exception handler handling it).

This feature is available in visual studio via the Debug > Exceptions menu.

Is there anything similar in eclipse? otherwise, how does one figure out the source of an exception assuming limited initial knowledge of the codebase?

like image 897
Joel Martinez Avatar asked Jun 14 '11 10:06

Joel Martinez


1 Answers

I don't know whether this also applies to Android debugging, but the feature is available for Java. In Eclipse, switch to the "debug" perspective. In the "Breakpoint" view, you will notice a little icon (at the top right, near the "minimize" button of the view) with a J and an exclamation point. This is the trigger to add "exception" breakpoints.

With this dialog, you can tell the debugger to suspend and caught and uncaught exceptions alike.

like image 142
Kellindil Avatar answered Sep 20 '22 18:09

Kellindil