Disable ANR messages while debugging
When the app stops at the breakpoint
ANR is thought to have occurred by the system
But really you're just waiting for the break point
The system doesn't know that
dialog show by System
No need to pop anr when debug is not considered
I think unless you modify the system source codeļ¼ Take that into account
I hope I can help you : )
An ANR will be triggered for your app when one of the following conditions occur:
- While your activity is in the foreground, your app has not responded to an input event or BroadcastReceiver (such as key press or screen touch events) within 5 seconds.
- While you do not have an activity in the foreground, your BroadcastReceiver hasn't finished executing within a considerable amount of time.
I'm not sure what is your case here but when debugging just don't interact with app (such at click button, tab on screen) and then the app will wait for the debugger.
In the Developer Options scroll down to the Debugging section and choose your app in "Select debugging app". This way it will not trigger any ANR when paused in a breakpoint.The setting value will be remembered even if you remove/reinstall your app.
Note that this option may not be available depending on your API level.