Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio starting in debug mode by default

I have been working on a project, and when I run the project in android studio it had been running correct and when I ran in debug mode it ran correctly.

All of a sudden, when I try to run the project normally, it pops up on the device waiting for debugger

and in the logcat I get this:

02-07 10:38:46.444    3968-3968/com.geog.test D/dalvikvm﹕ Late-enabling CheckJNI 02-07 10:38:46.784    3968-3968/com.geog.test W/ActivityThread﹕ Application com.geog.visitdub is waiting for the debugger on port 8100... 02-07 10:38:46.804    3968-3968/com.geog.test I/System.out﹕ Sending WAIT chunk 

and it goes no further. I don't know why this is happening, there is no debug command in the manifest, I have killed the adb and restarted as I did with android studio.

It's a real pain in the a*** as I can't run the app without going through debug mode. If anyone has any ideas I'd like to hear them

Thanks

like image 980
DJ-DOO Avatar asked Feb 07 '14 10:02

DJ-DOO


People also ask

How do I turn off debug mode on Android?

Go to Settings. Tap System > Developer options. Go to USB debugging and flip the switch to turn it off.

How do I start a program in debug mode?

Press Ctrl + Alt + F5 (or Shift + F9 ) to launch the app in debug mode. Choose Run -> Attach to process and select the signature of an app to enable the debug mode, which is already installed via adb.

What is the difference between debug and run in Android Studio?

Run simply launches the application (regardless of what the flavor is). Debug essentially does the same thing but will stop at any breakpoints that you might have set ...


2 Answers

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

like image 159
Piyush Agarwal Avatar answered Oct 24 '22 04:10

Piyush Agarwal


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.
like image 38
Carsten Svendsen Avatar answered Oct 24 '22 04:10

Carsten Svendsen