Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

android

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

like image 753
Ted Avatar asked Jan 08 '10 22:01

Ted


People also ask

What is wait for debugger?

This setting allows the execution of an app to be paused until a debugger is attached to it, upon the launch of the app. The app to debug must first be selected using the Debug app option.

Why is my debugger not working in Android Studio?

Debugger Isn't Working: Disconnected or Client not ready yetThis is usually a signal that the emulator instance is not properly connected with ADB and Android Studio. There are a few steps to try: First, try uninstalling the app from within the emulator and then restarting the emulator completely.

Which button starts the app with the debugger attached to the app process?

However, you can manually select the debugger in the debug configuration (click Run > Edit Configurations) or in the dialog that appears when you click Run > Attach debugger to Android process.

What tool is used to debug and connect to Android phones?

Android Debug Bridge (adb) is a versatile command-line tool that lets you communicate with a device. The adb command facilitates a variety of device actions, such as installing and debugging apps, and it provides access to a Unix shell that you can use to run a variety of commands on a device.


2 Answers

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

like image 155
Ted Avatar answered Nov 15 '22 17:11

Ted


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.

like image 23
codeno Avatar answered Nov 15 '22 17:11

codeno