Ted
Ted

Reputation: 20184

Why is the app waiting for the debugger when its not connected to computer?

It seems like every step I take in the Android world I run into problems.

Usually, I have my HTC Hero connected to the computer via USB and I launch the application either in debug mode or in normal mode.

So, the last time I ran the app in normal mode. Then I disconnect the device (I want to try to have it "free", not connected to computer) and I start the app from the menu. When I do that I get a popup saying "Application xxx is waiting for the debugger to attach" and there it stops and eventually dies.

Why is it waiting for the debugger, when the last time I ran the app (while connected) I didn't run it as Debug?

Edit 1

I might add this little weird fact:

If I do "Run" (green/white arrow) when the device is connected I still get a popup on the device saying "Application xxx is waiting for the debugger to attach".

Edit 2

Found this page. He restarted his device and that worked for me too. Stupid not to try that right away...

Upvotes: 86

Views: 42421

Answers (11)

Dawit Abraham
Dawit Abraham

Reputation: 1762

I fixed it by turning off "Developer Options" in settings and then turning it back on again.

Upvotes: 0

AaA
AaA

Reputation: 3694

Other than setting Select debug app to none, In android 9 and above (haven't check if exist in Android 8 but doesn't exist in Android 7) need to un-check Verify apps over USB

I recently upgraded my device from Android 7 to 9 and suddenly all my own apps (developed by me and are not signed) stopped working. disabling option mentioned above made them all work again.

Upvotes: 0

Vithu
Vithu

Reputation: 151

Turn off Developer option and turn it back on.

Upvotes: 0

Shinoo Goyal
Shinoo Goyal

Reputation: 621

"Wait for debugger"in Developer options may have been set with your application. Hence the application for debugger to attach.

Upvotes: 0

user5934402
user5934402

Reputation:

One more solution :)

In Android Studio 2.x follow these steps:-

1. Run the application:- Run Menu -> Run "app-name"

Image to check how to run application

2. Attach debugger to process:- Run Menu -> Attach debugger to Android Process Image to check how to attach debugger to process

Upvotes: 1

Ted
Ted

Reputation: 20184

Just to close this question: I restarted the device, and that helped.

Upvotes: 164

Selfx Aadhyant
Selfx Aadhyant

Reputation: 363

Restarting is more time taking, Easier way is that in the device, select "Developer Options" > “Select debug app” and select "Nothing".

Upvotes: 19

codeno
codeno

Reputation: 471

For me, the solution is to select "None" in "Developer Options"->"Debug"->"Choose debug application", though it already has "None" selected. Seems like the device put a "need to debug" label on my app sometime before which is still there when I "Run" the app on the device using my IDE (or even launch the app manually when the device is not connected to PC), and re-select "None" removes the label. Don't know whether it's the case.

Upvotes: 46

Lars
Lars

Reputation: 10092

Also, don't forget to go into your Android Settings under "Development Options" and unselect "Wait for Debugger"

Upvotes: 5

Austyn Mahoney
Austyn Mahoney

Reputation: 11408

You could also try removing the android:debuggable="true" from your AndroidManifest.xml file when you want to test the application by itself. Turning off development options in the preferences menu will help also.

Upvotes: 2

fupsduck
fupsduck

Reputation: 3189

I assume you are using Eclipse. Are you sure you are pressing the green circle with a white arrow and not the green bug button? Try closing the project, reconnecting the Hero, open the project and click the green/white arrow.

With your Edit1 - Try uninstalling the application from the Hero and try again.

With you Edit2 - I believe that will turn off all debugging capabilities. Good luck.

Upvotes: 1

Related Questions