Why Android Studio says "Waiting For Debugger" if am NOT debugging?

JavaAndroidAndroid StudioDebugging

Java Problem Overview


I am working with Android Studio. Since last night, when I Run my project on my device, appear the message "Waiting For Debugger". It is a very strange behavior because I am not debugging application.

I've tried to uninstall application from my device and press Run on Android Studio. The message appears again.

I've tried to restart Android Studio. The message appears again.

The only way to properly install application on my phone is to press "Debug". The message appears but its automatically closed. Then application works fine.

I've tried with

<application android:debuggable="false" />

... and still the message appears.

LogCat says:

E/InputDispatcher﹕ channel ~ Channel is unrecoverably broken and will be disposed!
E/Launcher﹕ Error finding setting, default accessibility to not found: accessibility_enabled

Regards on first error line, someone says that the problems can starts after renaming of some resource. But its not my case.

Regards on second error line, ... I don't know. I really don't know what happens to my IDE.

Java Solutions


Solution 1 - Java

I've ran into this issue in the past and again today. In my case the problem is resolved by a device reboot. After a clean boot I can again run the application and the "Waiting for Debugger" prompt does not appear.

Solution 2 - Java

You can fix this issue without re-booting your device. Just go to "Android device"->"Settings"->"Developer Options"->"Select app to be debugged" / "Select debug app". It will likely be pointing to your application. Just select the option and then select "None".

Note: As mentioned, even if "None" is already selected, re-selecting "None" appears to correct the problem.

Note #2: In newer Android devices, the settings location / name might be a bit different. I.e., in my case (Android 11, Samsung) the "None" option is shown as "Nothing" instead.

Just to be clear: This is on the device, not in Android Studio (cf. very helpful comment from Regis_AG).

Solution 3 - Java

faster than rebooting is Just go to developer options and switch it off and on again (dont forget to check usb debugging option too), worked for me(Neuxs5).

Solution 4 - Java

Please try this command to disable it.

adb shell am clear-debug-app

Solution 5 - Java

Without restarting the device, I was able to fix this issue by going to "Developer Options" and then first "disabling" and then "enabling"-

  1. USB Debugging
  2. Wireless ADB Debugging (Since I debug over the Wifi)

enter image description here

Solution 6 - Java

After 8 hours on this problem I feel obliged to share the cause. My /etc/hosts was bad.

Make sure you can ping localhost and that it is defined to 127.0.0.1. AS expects to connect to localhost:8600.

Solution 7 - Java

  1. Clear android studio cache memory from file->Invalid cache/restart.

  1. After restarting the android studio please restart android emulator.

Solution 8 - Java

I uninstalled the app with which this issue was occurring.

Then I installed the app with debug mode.

It solved the problem. Now it is working fine.

Solution 9 - Java

I have the same problem. In my case I have two development environments open in the same time: Android Studio and Eclipse. After I close Eclipse and run the debug process again works well. Hope this help!

Solution 10 - Java

You may want to check your debugging setting in Dev Setting on your AVD. Take a look at the following picture:

developer settings example

developer settings example

Solution 11 - Java

I had this problem; In Android Studio I accidentally hit Run > 'Debug App' instead of Run> Run 'App' . I solved the problem. In my case I had to get the application to launch successfully in DEBUG mode. Here were my steps-

  1. The android device needs to be able to connect to the development PC on port 8600. This connection was being disallowed by my firewall configuration. I turned off the firewall. Once confirmed I created a firewall rule to allow connectivity between the devices on port 8600.

  2. To validate that the port is available, you can go into Android Studio, Run > Attach debugger to Android Process. This will cause the android device application launched in DEBUG mode to connect to your Android Studio development PC.

  3. Once the app has launched once, you can go back and Run > Run 'App' and you will no longer get the annoying screen 'WAITING for DEBUGGER'.

  4. And you can also Run> Debug 'App'. The device will say "Waiting for Debugger" for a moment and then Android Studio will start up a Debugger Console and help you debug your android device app remotely!

Good luck

Solution 12 - Java

I have already solve this problem by reboot my device. It is a device issue not android studio issue.

Solution 13 - Java

My PC was running low on memory and this problem appeared quite often. Fix was to free up more memory by deleting old files/apps. I notice that running emulators like Android TV tend to need a lot of memory for them to run predictably

Solution 14 - Java

I fixed it by making duplicate Virtual device after wiping existing Virtual device.

Solution 15 - Java

Click on AVD Manager. From device actions option select "Cold Boot Now" Doing a cold boot in the emulator worked for me.

Solution 16 - Java

Clic and hold the Emulator's power button for 5 seconds, then clic restart.

Try again, the error should be gone

Solution 17 - Java

Save everything using ctrl+s or "File" -> "Save all". Go to your project directory and delete the .gradle folder then refresh window using F5. After this step, open project in Android Studio and run the application using Shift+F10 or Run -> "Run app". Then it should run in normal mode.

Solution 18 - Java

In my case the debug was stuck and didn't advance. So I remove the ".lldb" folder in the path "C:\Users{user}.lldb" and now is working.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionsensorarioView Question on Stackoverflow
Solution 1 - JavaJohn LewinView Answer on Stackoverflow
Solution 2 - JavaCodyFView Answer on Stackoverflow
Solution 3 - JavaRobocideView Answer on Stackoverflow
Solution 4 - JavaItay LevView Answer on Stackoverflow
Solution 5 - JavaManish PaulView Answer on Stackoverflow
Solution 6 - JavaLou PradoView Answer on Stackoverflow
Solution 7 - JavaRaghav ThakkarView Answer on Stackoverflow
Solution 8 - JavaAjay TanejaView Answer on Stackoverflow
Solution 9 - JavaLucian NovacView Answer on Stackoverflow
Solution 10 - JavaHanView Answer on Stackoverflow
Solution 11 - JavaJalkinView Answer on Stackoverflow
Solution 12 - JavaOdayView Answer on Stackoverflow
Solution 13 - Javakip2View Answer on Stackoverflow
Solution 14 - JavaMalwinder SinghView Answer on Stackoverflow
Solution 15 - JavaminatoView Answer on Stackoverflow
Solution 16 - JavaOscar OrtizView Answer on Stackoverflow
Solution 17 - JavaVismay ViradiyaView Answer on Stackoverflow
Solution 18 - JavaJosé TorresView Answer on Stackoverflow