Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug two processes in Android?

In my application an activity starts a service which runs as a separate process, I want to debug the Activity as well as the service but debugger does not stop at the breakpoints in service?

Thanks for help.

like image 855
Gaurav Agarwal Avatar asked Apr 05 '12 21:04

Gaurav Agarwal


1 Answers

Just to elaborate on the other answers here, you can temporarily put android.os.Debug.waitForDebugger(); in the code of your secondary process to make this easier.

Then, just attach your debugger to the process via DDMS or IntelliJ (or whatever you're using).

like image 91
wsanville Avatar answered Oct 24 '22 19:10

wsanville