1

According to this and this, it should be easy to have Android Studio break on an uncaught exception. However, whatever I try, I seem not to get it working.

I set the "Class Filter" on my Activity, but the app just crashes on an uncaught exception, no breakpoint triggered.

breakpoint config window

Community
  • 1
  • 1
Bart Friederichs
  • 33,050
  • 15
  • 95
  • 195

2 Answers2

1

Are you sure that the exception being raised is from the class that you've specified in the class filter?

Try configuring to break on all exceptions without the class filter enabled to validate that it's actually the specified class raising the exception: https://stackoverflow.com/a/28862538/3063884

Community
  • 1
  • 1
CJBS
  • 15,147
  • 6
  • 86
  • 135
  • Yes, if I select "all exceptions" it does break. But, it also breaks on exceptions that are caught inside my class. Apparently, the exception I want to see *is* caught, somewhere in the system. For, now I work with 'all exceptions`. – Bart Friederichs Mar 05 '15 at 07:38
  • Interesting... because in your Breakpoints screen-dump, you've got both 'Caught exception' and 'Uncaught exception' checked, so it shouldn't matter. – CJBS Mar 05 '15 at 16:53
0

I was unable to get the debugger to stop for anything until I clicked on the app folder in the project view (one level below root). Clicking on the Root folder of the project didn't work either.

Eric Engel
  • 305
  • 4
  • 15