Debug Android apps using jdb command line

I am configuring emacs to debug Android applications. My problem is that I am binding jdb to DDMS. I cannot set the correct class path (jdb just doesn't start when I try to install -classpath and -attach together). Thus, jdb is almost blind - there is no entry point for the class, there is no interactive debugging. How can I specify the class path when connecting the debugger to ddms?

+4
source share
1 answer

According to the JDB landing page, "-classpath" refers to "Parameters redirected to the debugging process." In other words, it does not tell jdb where to find the material, it reports that the application is being debugged where the material can be found.

Since you are connecting to a running process, this makes no sense.

All information necessary for debugging the process is stored in DEX files on the device; you don't need jar / dex files on the host side for jdb to play. The only thing that won't work is a "list", but if you're sitting in emacs, you probably don't need this.

I have successfully used jdb to perform all kinds of debugging tasks. What I forget most often is to specify the full name of the class (for example, java.lang.String, not just String). If you do this and still get crashes, please paste the jdb debugging example here here.

+3
source

All Articles