How to resolve “Waiting for Debugger” message?

前端 未结 30 1982
眼角桃花
眼角桃花 2020-11-27 02:42

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 m

相关标签:
30条回答
  • 2020-11-27 03:17

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

    android:debuggable="true"
    

    in the application tag in the AndroidManifest.xml

    0 讨论(0)
  • 2020-11-27 03:17

    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.

    0 讨论(0)
  • 2020-11-27 03:17

    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

    0 讨论(0)
  • 2020-11-27 03:17

    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.

    0 讨论(0)
  • 2020-11-27 03:18

    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.

    0 讨论(0)
  • 2020-11-27 03:20

    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.

    0 讨论(0)
提交回复
热议问题