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...


Asked by: Brooke856 | Posted: 20-01-2022






Answer 1

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

Answered by: Stella802 | Posted: 21-02-2022



Answer 2

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.

Answered by: David899 | Posted: 21-02-2022



Answer 3

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

Answered by: Ada465 | Posted: 21-02-2022



Answer 4

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

Answered by: Anna327 | Posted: 21-02-2022



Answer 5

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.

Answered by: Brooke572 | Posted: 21-02-2022



Answer 6

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.

Answered by: Miller414 | Posted: 21-02-2022



Answer 7

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

Answered by: Freddie203 | Posted: 21-02-2022



Answer 8

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

Answered by: Anna444 | Posted: 21-02-2022



Answer 9

Turn off Developer option and turn it back on.

Answered by: Chester563 | Posted: 21-02-2022



Answer 10

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.

Answered by: Lenny814 | Posted: 21-02-2022



Answer 11

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

Answered by: Rebecca347 | Posted: 21-02-2022



Similar questions

How to debug android crashes when not connected to the debugger

How do I debug an app crash when the device is not connected to the eclipse debugger? There are 2 category of crashes, one is when a particular action is performed and the app crashed right away, these a easily reproducible, since I can connect the device to the computer and perform the same operation. There is another category of crashes, usually happen when the app has been idle/in the background/device screen off/etc......


android - Sending data to a server when the device is connected to Internet

My app needs to send some data to a server when the device is connected. I have been reading about native Android Broadcast actions. I was willing to find a way to use one as gmail does when the device connects to the Internet. (The "loading" icon on the top while it syncs mails) Is it ACTION_SYNC w...


java - How to know if i am successfully connected to my outgoing number in Android?

Need to know this so that i could send DTMF and that is going to be my second question!


How can i check whether an android device is connected to the web?

How would i know whether my device is connected the web or not? How can i detect connectivity? Any sample code?


binding - Android how do I wait until a service is actually connected?

I have an Activity calling a Service defined in IDownloaderService.aidl: public class Downloader extends Activity { IDownloaderService downloader = null; // ... In Downloader.onCreate(Bundle) I tried to bindService Intent serviceIntent = new Intent(this, DownloaderService.class); if (bindService(serviceIntent, sc, BIND_AUTO_CREATE)) { // ... and within ...


android - How to detect power connected state?

Is there an easy way to be notified when USB or AC power is connected to an Android phone?


How to tell if USB is connected to android device?

I've written an Android application and I would like the application to be able to recognize when the Android device is plugged into a PC via the USB or even better, know when it is connected and adb logcat is running. Is this possible? My purpose is to write traces to a separate circular buffer (which would get written to the sdcard occasionally) except when the device is connected e.g., via Eclipse and logcat is ...


android - list connected bluetooth devices?

How can I list all connected bluetooth devices on android ? thanks!


Android: "Socket Not Connected" Exception

I'm having some issues with sending data from an Android client to a desktop server over TCP via wifi. The emulator works fine, but on the actual phone, the connection cannot be established. A "socket not connected" exception was thrown. I have attached my code below. Any help please? Many thanks! // CODE inside an Activity public boolean onOptionsItemSelected(MenuItem item) { switch (ite...


android - Motorola flipout cannot access SD card while USB connected

I have a Motorola flipout with Android 2.1. and the USB my driver is the following: http://developer.motorola.com/docstools/USB_Drivers/Handset_USB_Driver_64/ Whenever I connect the USB cord to the cellphone I can access the SD card from the computer and I no longer can access it from the cellphone. That means th...


android - Why does my app crash when my server is not connected?

I send some parameters to my server with httpGet or httpPost and it works fine when my client is connected to my server. But when it's not, my app crash. However, I have a try/catch... Look at my code: ((ImageButton)findViewById(R.id.pickSurnom)).setOnClickListener(new OnClickListener(){ public void onClick(View v) { AlertDialog.Builder alert = new...






Still can't find your answer? Check out these communities...



Android Google Support | Android Community | Android Community (Facebook) | Dev.io Android



top