While debugging an application and stopped at a breakpoint, Android repeatedly displays "<Application> isn't responding. Do you want to close it?" dialogs with a "wait" and "ok" option. Is there any way to disable those while an application is being debugged?
-
1This is still an issue, other questions are years older and their answers actually explain how to get this level of behaviour that we now want to get past. I need time to actually analyze the debug info. The app should not be killed while at a breakpoint. – Nick Cardoso Jan 11 '19 at 13:57
-
is this still a thing nowadays? – rexxar May 01 '20 at 12:02
-
I noticed it just a day or two ago. – spaaarky21 May 01 '20 at 18:06
-
I can't reproduce it on Android 11 – Dissident Dev Jan 08 '22 at 14:22
4 Answers
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.

- 16,449
- 15
- 74
- 127
-
Thank you. This is the perfect solution for ANR during debugging – Vinayak Khedkar Apr 06 '23 at 15:13
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 : )

- 29
- 1
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 the app (such as click button, tab on screen) and then the app will wait for the debugger.

- 481
- 2
- 9
If your applications shows that message when is not staying on breakpoint there is definitely too much computation on the main thread and you should get rid of complex calculations on main thread and move them to background threads

- 957
- 8
- 15
-
The question is specifically about Android showing the message while stopped at a breakpoint. – spaaarky21 Jun 24 '19 at 17:45