Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Waiting for debugger to attach" showing even when not running in debug mode

My problem:

I ran upon an awkward problem as I was developing my application. As mentioned in the title, every time I install my application (in run mode, not debug!) at start-up the waiting for debugger to connect.. message appears for 1-2-3 seconds, and the application starts.

What I want:

What I would like is to be able to start the application without that message appearing (it only started appearing in the last few days, and I can't remember changing anything related to debugging).

What I've tried:

  • I have tried setting the android:debuggable="false" but if I do this the debugger never attaches and the message never disappears.
  • I have also tried after installing to disable USB Debugging, but still no results.
  • Even if I kill the application and wake it up through an external source (it uses Google's C2D Messaging Framework) it still tries to run in debug mode on wake-up.

I have developed several Android applications and never stumbled upon this. Why wouldn't I be able to start the application in RUN mode? Is there any other way to install the application on the device, without hitting the run button in Eclipse?

I can post code-snippets from the AndroidManifest or from other parts of the code if necessary, but as I already mentioned I wasn't getting this kind of weird behavior several days ago.

like image 231
Raul Rene Avatar asked May 13 '12 16:05

Raul Rene


People also ask

How do I turn debug mode off?

To disable USB Debugging mode: Go to Settings and scroll to the System section (on Android 8 and above, go to Settings > System) Tap Developer Options. Tap the button to toggle developer options Off.

How do I wait for debugger?

Go to Settings > Developer options > Select debug app and choose your app from the list, then click Wait for debugger. Wait for the app to load and a dialog to appear telling you the app is waiting for a debugger.

How do I set Debuggable to true?

Show activity on this post. By putting android:debuggable="true" in your manifest file, application will go in debug mode, that means android will manage all logs file regarding your application. But make sure put it again false (or remove this tag) if application will going to live or for release mode.


1 Answers

Make sure your java files dont have any break point and Restart the device every thing should be normal.

I was experience the same problems where my application was always being run in debug mode. Restarting the device did the trick for me.

and make sure you are using

right click on project-->>Run As -->> Android Application

like image 92
Akram Avatar answered Sep 30 '22 17:09

Akram