Can I connect to a running android app?

Hello all, and thanks in advance for any help you can offer.

I have used IDEA for six years, and have found it very easy to reconnect the debugger to a running Java process. All I have to do is click connect, and I'm debugging.

However, I have recently started working primarily on Android applications. Even though Eclipse is the recommended IDE, I wanted to stay with IDEA because it simply rocks. The problem is that there are several bugs I am trying to track down that require that I: 1) Run my application, 2) send my application to the background by hitting the home key on my device, 3) have the Android OS kill my application by opening a bunch of other memory intensive apps, 4) reopen my application, at which point the bug appears. Unfortunately, I cannot find a way to connect to a running instance in IDEA so that I can actually debug at step 4. It will ONLY let me completely reinstall and start that new instance, which makes it impossible to perform this very common use case.

If any developers who worked on the Android plugin can comment, I would really appreciate it.




You can сhoose "Do not launch Activity" option in Android run configuration settings, and then launch debug. IDEA will reinstall your application, but won't run it, so you can run and stop it manually, IDEA won't close a debug session.
Unfortunatelly now IDEA doesn't support launching an application without reinstall, you can create an issue if you need it:


Eugene, I will file an enhancement request. Thanks!


Eugene, I filed the following enhancement request. Please vote this thread up if you are having the same problem as me


Please sign in to leave a comment.