Accepted answer

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

  <uses-permission android:name="android.permission.set_debug_app"></uses-permission>


have read alot about this and the only solution that worked for me was to create a new project and then copy old project back into it.


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.


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.


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.


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.


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.


for android studio users i encountered this problem first time while trying to run a bare bone project just after updating my jdk location. so i stumbled across this post. in my case simple build->clean project did the job.


i was also having the same problem when using android studio and genymotion. i am able to solve this problem by pausing the program and resuming it again after "waiting for debugger" message is shown. it may work while using other ides and emulators as well.enter image description here


android studio 1.2.2 on mac os 10.10 same problem as others have reported. i closed android studio, then checked from command line in terminal:

ps -efw|grep -i android

this reported a java process (.gradle/daemon) associated with android studio. i killed this process, restarted android studio, and the problem went away.


disable you developer option in your phone.

settings > developer option > disable

this worked for me, when i tried to use my application without debugging it.


what solved the problem for me was going to: "run"->"attach debugger to android process" and then select your process.

you do this in android studio.


this may be old, but for genymotion's latest update 2.7.1, go to developer options, if in case you dont know how to open that option, go to about phone and click build number few times and developer options will be enabled. turn on developer option, check usb debugging.

tested on genymotion 4.4 and up. weird solution eh ? but definitely works. hope it helps. happy codings.


in debug mode android studio connects to your device via socket(:8600). somehow your socket connection is choked and thus not responding to incoming connections.

restart android studio and your problem will be resolved


"wait for debugger"in developer options may have been set to wait your application.please clear that option and application should run normally.


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.


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


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.


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.


i end up 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.


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.


in my case, the problem is caused by adb connected with another device.

if several devices are connected in pc, remove other devices except required one.


i solved this issue this way:

go to run menu ====> click on edit configurations ====> micellaneous and finaly uncheck the option skip installation if apk has not changed

enter image description here

enter image description here


rebooting the phone was the solution for me.


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.


running android studio, i ran into this problem and after trying various remedies restarting android studio is what appeared to fix the problem.


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


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, or two instances of eclipse open.


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.


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


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


in the application tag in the androidmanifest.xml


the dialog waiting for debugger is shown if you are building a debug application or somewhere in your source code, you called debug.waitingfordebugger();

inside android studio 2.0 and above, there is an option of attach debugger to android process. it is the last menu item in the run menu.

screen shot of run menu options in android studio

Related Query

More Query from same tag