开发者

Android app debugging with command line jdb

开发者 https://www.devze.com 2023-01-24 09:49 出处:网络
I\'m configuring emacs to debug android apps. My problem is since I\'m attaching jdb to DDMS I cannot set proper classpath (jdb just won\'t start when I try to set -classpath and -attachtogether). So

I'm configuring emacs to debug android apps. My problem is since I'm attaching jdb to DDMS I cannot set proper classpath (jdb just won't start when I try to set -classpath and -attach together). So jdb is practically blind - no entry point for class, no interactive debugging. How can开发者_如何学C I specify classpath when attaching debugger to ddms?


According to the JDB man page "-classpath" is among the "Options Forwarded to Debuggee Process". In other words, it doesn't tell jdb where to find stuff, it tells the application being debugged where to find stuff.

Since you're connecting to a running process, this doesn't make any sense.

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

I have successfully used jdb to perform all sorts of debugging tasks. The thing I forget most often is that you have to specify the fully qualified class name (e.g. java.lang.String rather than just String). If you're doing that, and still getting failures, please paste an example jdb debugging session here.

0

精彩评论

暂无评论...
验证码 换一张
取 消