some devices will only let the debugger attach if the application has the android.permission.set_debug_app permission set in its manifest file:
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.
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.
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.
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.
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.
not sure if this is what you are looking for, but try putting:
in the application tag in the
- How to resolve "Waiting for Debugger" message?
- Application is waiting for the debugger to attach
- How do I use the Eclipse debugger in an AsyncTask when developing for Android?
- How to resolve error "No runtime specified. WLS Web Service projects require a runtime to be present for most tooling." when publishing my project?
- How do I resolve this " No such property [target] in org.apache.log4j.FileAppender" and "No output stream or file set for the appender named" error?
- How to resolve missing required bundle for SonarLint eclipse
- How to let maven resolve transitive dependency for local dependency
- How do I resolve this error message to create an Enum: "Project 'MyFunProject' is not a J2SE 5.0 compliant project."
- How to setup debugger in Eclipse Juno for C/C++ on windows
- In eclipse how to show exception message of debugger code executed in display window?
- How do I resolve the error "No file system is defined for scheme: sourcecontrol" in Eclipse
- How do I block SWT UI thread while waiting for server response
- How to Resolve 'not found: object anorm' for play 2.4.3
- Application is waiting for debugger
- How to resolve "ImportWarning: can't resolve package from __spec__ ..." in Eclipse PyDev for ema_workbench?
- how to setup a debugger for AEM or CQ?
- Android stop waiting for debugger
- How to resolve javax.xml.bind for SE-11 by adding external jars?
- Debugging hangs with "Application is waiting for debugger to attach" on Android with Eclipse
- How do you change what the Eclipse debugger displays for an object in the Variables pane?
- How to set up source mapping using 'V8 debugger for node' in Eclipse
- Eclipse debugger - not work suddenly ( waiting for debugger forever)
- How to have change debugger setting in Eclipse for a launch file
- how to fix source not found message for coldfusion eclipse remote debugging?
- How do i attach debugger for bootup receiver in android?
- How to resolve method is not for extension check style error
- How to understand the error message for this code snippet?
- How to resolve "You are not running your eclipse instance with java 8" for JavaFX in Eclipse Mars 2.0
- How can I use the debugger on a Spring Boot application for the Google App Engine (standard)
- How do I resolve No qualifying bean for dependency using Java config
More Query from same tag
- team synchronize perspective in eclipse has no context menu on right click
- Showing error that platform name cannot be resolved even i added all the required files regarding to it
- Eclipse - Error in re-setting breakpoint in C++ Project
- Eclipse c++11 thread support not working
- Eclipse won't start to run Stanford karel
- Where do program-created files end up in Eclipse?
- Error: Program "make" not found in PATH
- SpringSecurityUser class not found in Maven repository
- Eclipse Plugin - Create a view with a table
- How to restrict the minimum size of the window for Eclipse e4
- Eclipse remove arrow icons
- Leading Question Mark causes Eclipse "No resource found that matches the given name" Error
- Where the error 'Content is not allowed in prolog' comes from?
- save and view snapshot image from android device
- How to find annotation usage using Eclipse IDE?
- How to import a project into eclipse downloaded from developer.android.com zip file
- Changing images as service start
- How to mirror a p2 update site to my remote p2 update site?
- Java Rectangular Selection
- Could not find or load main class src.main.Main
- Operation not supported for specified element type
- Why isn't my war file containing all of the contents?
- Eclipse Formatter: Wrap Nested ArrayList Declarations
- one-to-many without foreign key in hibernate
- gitignore in Eclipse workspace rather than each project
- Java, Eclipse, Packages, and files
- ndk-gdb and eclipse "No Source File named..."
- Maven keeps changing project settings - How to edit effective pom file?
- Emacs color syntax configuration
- Gridlayout with borders