2

さて、私はjdbからAndroidアプリをデバッグしようとしています。

エミュレーターを実行し、アプリをインストールし、ddmsを実行してから、アプリを起動してDDMSで選択します。次のコマンドでjdbを実行します

jdb -attach localhost:8700 -sourcepath / project-root / src

jdbはプロセスにアタッチでき、次に次のようなコマンドをアタッチできます。

com.android.helloworld.onClickで停止します

うまく機能します。

ただし、EmacsでCxスペースを使用すると、行番号を指定してコマンドが実行されます。

com.android.helloworld:22で停止します

そして私はこの出力を取得します

ブレークポイントを設定できませんcom.android.helloworld:22:com.android.helloworldの22行目にコードがありません

行番号が正しいことを確認し、ファイル名自体を渡そうとしましたが、役に立ちませんでした。何か案は?

4

1 に答える 1

2

The Android SDK comes with an android.el that has the 'android-jdb' command in it. That will set up the keybindings correctly for you. (At least, I presume it will, I didn't try those keybindings last time I was using it.)

As a bonus, if you try out CEDET from the bzr trunk, it includes android support. After basic CEDET setup (see cedet.info for android details) it has a convenience for quickly starting up the debugger and attaching to your device with the debugger. It supports some other fun stuff too.

于 2011-09-16T01:51:34.827 に答える