1. 在linux下编译源码

2. 拷贝myandroid\out\target\product\generic\*.img 到{Android SDK}\tools\lib\images 并且覆盖源文件

3.运行{Android SDK}\tools目录下的emulator.exe

4.启动eclipse.exe

5. 在eclipse中,添加要调试模块的代码,如phoneapp,在file->new->添加android工程,选择从源码添加

6. 启动eclipse的ddms,选择要调试的进程,如phone,然后选择绿色的小虫子图标

7. 切换到debug视图模式,为要调试的代码添加源码路径

8. 设置断点

9. 进入emulator.exe,执行要调试的程序即可。