With my application i realized a broadcastreceiver fired by a general intent of Android. So the program got no Interface or initial activity. To debug ive selected in the dev tools the "wait for debugger" and it actually works (i can debug the broadcastReceiver). My problem is that dalvik kills my thread (and the whole debug) after few seconds so im unable to check or try step-to-step my procedures. Anybody knows how to solve this?
You need your BroadcastReceiver
to have this in the Manifest:
android:process=":remote"
Put this in your onReceive
method:
android.os.Debug.waitForDebugger();
Then run the project. After that click on Attach debugger to Android process and wait for your process to show up (it will have this name: your.package.name:remote
) in the window Choose your process, then click OK and start debugging.
In developer options: Select debug app -> your app Wait for debugger
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With