Blog coding and discussion of coding about JavaScript, PHP, CGI, general web building etc.

Sunday, January 17, 2016

How to resolve

How to resolve "Waiting for Debugger" message?


I have HTC Comet connected to Eclipse with SDK 2.2. I do a debug build - the application does not run; though it does get installed on the device. On the device I get this message box on the Comet screen

Waiting for Debugger
Application HunyDew (process com.airvine.hunydew) is waiting for the debugger to attach.
[Force Close]

Whereas in the Eclipse console I get these set of messages

[2010-12-07 01:42:29 - hunydewprj] Android Launch!    [2010-12-07 01:42:29 - hunydewprj] adb is running normally.    [2010-12-07 01:42:29 - hunydewprj] Performing com.airvine.hunydew.HunyDewAAStartsHere activity launch    [2010-12-07 01:42:47 - hunydewprj] Application already deployed. No need to reinstall.    [2010-12-07 01:42:47 - hunydewprj] Starting activity com.airvine.hunydew.HunyDewAAStartsHere on device 308730C861BC    [2010-12-07 01:42:49 - hunydewprj] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.airvine.hunydew/.HunyDewAAStartsHere }    [2010-12-07 01:42:49 - hunydewprj] Attempting to connect debugger to 'com.airvine.hunydew' on port 8601    [2010-12-07 01:43:09 - hunydewprj] Launch error: Failed to connect to remote VM. Connection timed out.    

The application runs fine in the Emulator - please help - what is it that I am missing here? Any hints/suggestions? Thanks

Answer by Iain for How to resolve "Waiting for Debugger" message?


Some devices will only let the debugger attach if the application has the android.permission.SET_DEBUG_APP permission set in its manifest file:

         

Answer by Andy for How to resolve "Waiting for Debugger" message?


Sometimes I get this if I switch the usb cable to a difference port on my PC, odd but it works when I switch it back again. Also I think I've got this when there's been another device or emulator running at the same time!

** Edit **

Just happened to me again! I remember now that it happens frequently when I have two instances of eclipse open, does this help?

Answer by Prateek Jain for How to resolve "Waiting for Debugger" message?


Not sure if this is what you are looking for, but try putting:

android:debuggable="true"  

in the application tag in the AndroidManifest.xml

Answer by JimR for How to resolve "Waiting for Debugger" message?


If your development environment is Windows make sure the USB drivers are correctly installed.

One way to ensure that the USB drivers are installed correctly is to get the PDANet Windows installer and let it install the USB drivers.

You can find the PDANet page here.

Answer by Manfred Moser for How to resolve "Waiting for Debugger" message?


I would try to connect to the phone with ddms on its own without Eclipse. You might be running an emulator inside eclipse that you dont see or have some other problems with Eclipse.

Just run ddms from a command prompt and see if the device appears and you can connect to it.

You can also see if appears when you run adb devices and see that your phone is listed (and maybve something else..)

Answer by JP2014 for How to resolve "Waiting for Debugger" message?


I ran into this problem today. After spending most of the day trying to fix it, the only thing that ended up working was to create a new workspace and import my project into it. I hope this helps someone avoid all the trouble that I went through.

Answer by b-ryce for How to resolve "Waiting for Debugger" message?


I got the same problem, I know I wasn't running any other instances, and I could see it with adb devices. I just did a restart of eclipse and it worked.

Answer by Brandon Englert for How to resolve "Waiting for Debugger" message?


I think I ran into this same kind of problem today. Each time I tried to launch the project on my phone it gave me a message at the beginning saying it was trying to connect to the debugger.

I fixed it just by going to DDMS in Eclipse and wiping the debugger that was listed under the devices tab. Didn't need to go into a new workspace or restart eclipse.

Answer by karol for How to resolve "Waiting for Debugger" message?


I have this problem frequently. The above answers can work but sometimes I'm still waiting for that debugger.

My solution is to use the Dalvik Debug Monitor. Sometimes there is a red or green bug beside a process. Click on the device you're trying to load to. Select the Actions tab and reset adb. This usually attaches the debugger for me. I find that doing debugging through this Monitor works better for me than using the android eclipse plugin Logcat.

Answer by Apisarn Sasuk for How to resolve "Waiting for Debugger" message?


I have being faced this problem. And trying to fix with many possible solutions. And I end up with just going into "Debug" perspective. Then in the "Debug" frame, there are debug list or running list. You have to decide which one is your current one that has this problem (Waiting for debug...) Then do right-click and choose "Terminate and Remove". Then you try to run again. And that warning box will be gone.

This might solve any one issue. Please try this.

Answer by Erik for How to resolve "Waiting for Debugger" message?


same here, solution was to run the "adb uninstall com.yourapp.someapp"

Answer by Stevens for How to resolve "Waiting for Debugger" message?


I've got this problem for long that I cant get my android emulator or device connect to the debugger while both the console and the emulator were displaying waiting for connecting to the debugger.

And configuration for debug inside eclipse also confused me so much before, but today, i got this problem solved, by the following steps:

When you want to debug a android project, for instance, mypro. you would right click on it in the "Package Explorer". Then choose "Debug as"-->"Android Application".

Then the emulator might stop at the "Waiting for connecting to debugger"(or something else similar to this).

Then you need to connect to the debugger yourself by click "DDMS" to open the DDMS perspective, and click "Devices" tab.

Then you can see a list of processes that are running on your emulator or device.

Double click on the one which you are debugging, then change to the Debug perspective, you can see the debugger is connected and you could debug your program. That's how I solved this problem.

By the way, my OS is Win7 32-bit. Eclipse's version is Helios Service Release 2. Android SDK is rev. 16 and platform-tools' 10.

Update.

I found that it is the problem of my TCP/IP configuration. The debugger can't be connected when i assign a static IP address(for access to internet).

So every time when the debugger is unable to connect, I always do the following steps:

1.close current eclipse window.

2.change the config of IP address to dynamic, it means getting a IP address by DHCP.

3.open up the eclipse again.

then the debugger is able to be connected. I thought it might be a issue of the internal mechanism of java debugger which is using socket connection.

Answer by Andrey Talnikov for How to resolve "Waiting for Debugger" message?


I had the same issue, fixed it by explicitly selecting desired device in debug configuration. Unfortunately, even after that log sometimes stops when debugger tries to connect. In this case in DDMS perspective find the desired process. It will be highlighted with green bug. Click stop and then debug it again.

Hope it helps.

Answer by Mr. Bungle for How to resolve "Waiting for Debugger" message?


Rebooting the PC was the only thing that worked for me. It worked when I had this problem with an Android 2.2 phone, and also an Android 3.1 tablet.

Answer by CQM for How to resolve "Waiting for Debugger" message?


Closing the emulator and closing eclipse. Reopening Eclipse and starting the simulator worked for me.

The key thing to look for is in the Devices pane of Eclipse. If you start the emulator or device and it shows up in the device name list but says [null] and no running processes show beneath it, then it won't work correctly with loading your app into it.

If the name of the device comes up and is Online then things seem to work smoothly.

Don't know why it doesn't work out all the time though.

Answer by Daniel for How to resolve "Waiting for Debugger" message?


I also enounter this problem. In my environment, I use a tomcat as server and android as client. I found, If tomcat is started, this error " Launch error: Failed to connect to remote VM. Connection timed out." will occur. If tomcat is not run, adb works well.

Answer by Alexis Pigeon for How to resolve "Waiting for Debugger" message?


I tried all the solutions above, it fixes the issue sometimes, but still from time to time I happened to get stuck with the "Waiting for the debugger to attach" message box.

The final solution in my case was to unplug all the Android devices but the one I want to debug on. I don't know which one is the culprit: the Nexus 7 running JB 4.2, the HTC One X running ICS, the HTC Desire S running Gingerbread, or the combintation of the 3, but as soon as I only have one device plugged in, it runs smooth as silk.

Answer by John for How to resolve "Waiting for Debugger" message?


For those getting this annoying behavior in 4.2.2 you have to un-check the setting for "wait for debugger" in the developer options. Of course, those options were hidden by Google, and you have to do a sneaky trick to get them to show back up. I had set them before they disappeared, and couldn't for the life of me find them again.

This page explains the procedure

Answer by Hong for How to resolve "Waiting for Debugger" message?


I used Task Manager to kill adb.exe to solve this problem. Adb.exe will automatically start after being killed.

Killing adb.exe has solved a lot of problems related to debug and emulators for me so far.

Answer by MSI for How to resolve "Waiting for Debugger" message?


My two projects were open in Eclipse when I was receiving the message. Closing down one eclipse instance solved the problem.

0 comments:

Post a Comment

Popular Posts

Powered by Blogger.