debug background service in android using intelliJ

2019-05-16 23:11发布

问题:

I recently switched from eclipse to IntelliJ for android development (due to the better team support w/ projects/modules). However, when I try to debug the a background service, it appears this is not possible to do. Has anyone successfully gotten intelliJ to debug a bg service?

many thanks Ben

回答1:

There are 2 ways to do it:

  1. In the Android Run/Debug configuration disable Deploy application and enable Do not launch Activity.

  2. In the toolbar use the Attach debugger to Android process button: