Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

debugging app when launched by intent filter

I normally debug my apps by pressing the little "bug" icon in Eclipse.

But now I have inserted an intent filter like this in my manifest:

 <action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />

While the app launches now automatically when the USB cable is plugged in - I cannot debug it anymore. There is no stop at any breakpoint anymore.

How would I debug the app when launched through an intent?

Many thanks!

like image 471
user387184 Avatar asked Apr 09 '12 11:04

user387184


1 Answers

I have a Nexus 6P, and in my Developer options there's a "Wait for debugger" toggle. That worked for me. You also have to choose your app as the app to debug. "Select debug app". And of course you have to have installed the debuggable version of your app. Just do a debug launch in Eclipse or Android Studio.

enter image description here

like image 84
Jerinaw Avatar answered Sep 21 '22 10:09

Jerinaw