Reputation: 37093
I just used Android Studio to make an unmodified empty Android app. I'm trying to set an exception breakpoint.
The default exception breakpoint triggers repeatedly. So I added !(this instance of java.lang.ClassNotFoundException)
as a condition, as suggested in this question.
However, I still get interrupted by my exception, this time with a modal dialog box:
How do I make an exception breakpoint that will stay silent until something exceptional happens?
Edited to clarify: I don't want to make a breakpoint for a specific exception, I want a general exception breakpoint that I can leave on at all times.
Upvotes: 7
Views: 3347
Reputation: 15685
The key here is to use class filters in conjunction with configuration to break on all errors, setting them to very high-level namespaces.
Specify class namespace patterns by clicking on the (Add Pattern) button. Enter:
com.myapp.*
(replace this with the namespace prefix of your app)java.*
android.*
See here for full instructions.
Upvotes: 1
Reputation: 27
Android Studio is essentially IntelliJ IDEA. You have got to use the + button in the top left corner of the Breakpoints screen to add a breakpoint for a specific exception.
See the following thread for details: How to use Intellij Idea's exception breakpoints
Upvotes: 0