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.
How to add an Exception Breakpoint? Step 1 − To add an exception breakpoint, first move to breakpoint navigator in xcode. Step 2 − Click on the + option at the left bottom of the navigator and select Exception breakpoint. Once you select exception breakpoint, it will be added to our code.
To set a breakpoint in Android Studio, you need to navigate to a specific line of code and then click in the gutter next to the line number. To unset a breakpoint, you need to click an existing breakpoint in the gutter to make it disappear.
Exception breakpoints: suspend the program when Throwable or its subclasses are thrown. They apply globally to the exception condition and do not require a particular source code reference.
Exception Breakpoint: This type of breakpoint is used to halt execution when a specified exception type is thrown at any time during execution. To set an exception breakpoint in Eclipse, use the "Run -> Add Java Exception Breakpoint..." menu item.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With