Search code examples
androiddebuggingbreakpointsandroid-anr-dialog

Android not responding if Debugging. If not in Debug app works normally


When I'm debugging and the app hits an breakpoint, I can debug normally for a while. Some time later, Android displays the ANR Dialog, but I still can debug normally.

If I don't click on the Phone's screen, it ends the debug, so I need to keep my eye on the screen when debugging and that's annoying and really wastes my time, because sometimes the dialog keeps popping every 10 seconds.

I don't know what is causing this. I tried restarting the Machine, Phone, ADB and already tried using debuggable="true" on AndroidManifest, with no success.


Solution

  • For those stumbling upon this looking for a solution, the comment from @FedeH did it for me:

    You can select your app as a debugging app under the developer options. This may help to reduce the unwanted system alerts.