第一步,启动emulator
Run the emulator as background process at first.
$./emulator &
第二步,把eclipse切换到DDMS状态。右上角(和java debug在一起那个)
第三步,选择菜单,配置环境
Run->Debug Configurations->Remote Java Application->new
Set Name,like phone
Set project, like android22
Set Host, like localhost
Set Port, like 8602
If you finish all setting, press "Apply
ok, let's go, press "Debug
第四步,等待attached完成
After launching mms: (100%), you can see the green bug attached on your process "com.android.mms".
第五步,设置断点开始debug
After all settings have been done. you can add the breakpoints into the source code where you want to debug.
第六步,执行程序,当走到断点处时,会停在那里。这时候,你在debug这个标签内(和java ddms在一起那个),可以使用:step into , step return, step over etc.(这些命令在Run菜单内,或者面板上都有。)