Android Studio starting in debug mode by default

In my case, there was an AsyncTask whose doInBackground() method called android.os.Debug.waitForDebugger(), and this was being picked up even in run mode. Disabling the line fixed it. Restarting the device didn't help.


The above suggestions were too invasive for me so I digged a little more into it. The following solution works for me in android studio:

  • Start debugging. (You'll get the wait chunk message here)
  • Select the Debug pane with the bug icon.
  • press the small cross at the side menu.
  • press "Force close" on your device.
  • Restart debugging.

Restart your Android Device once and also check there should not be any breakpoints in your java classes.