在Eclipse中的Android框架源代码级调试 [英] Android framework source level debugging in Eclipse

查看:118
本文介绍了在Eclipse中的Android框架源代码级调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

source.android.com可以获得Android框架的Java源代码。我可以下载并将其提供给Eclipse,以便我可以在调试时进入框架方法吗?更好的是,有没有人知道一个Eclipse插件,可以根据需要自动从Android Git获取他们?



编辑:在调试期间,我可以通过框架代码;我可以看到本地变量的声明名称和行号。似乎调试信息已经存在,只有源文件丢失。虽然我可以并行打开它并观察执行,但版本匹配的问题依然存在。在Git中的类文件的许多版本中,如何选择与设备上运行的任何内容(或仿真器)匹配的文件?这更是一个Git导航问题 - 如何拿起Android版本的文件的版本,比如2.2?



稍后编辑:now来源预包装Android SDK。这个问题有点过时了。

解决方案

这篇文章很好地解释了如何实现这一点: http://android.opensourceror.org/2010/01/18/android-source/


the Java sources for the Android framework are available at source.android.com. Can I download and feed them to Eclipse so that I can step into framework methods while debugging? Better yet, does anyone know of an Eclipse plug-in that would get them from Android Git automatically as needed?

EDIT: during debugging, I can step through the framework code; I can see local variables by their declared names, and line numbers as well. It seems like the debug info is already there - only the source file is missing. While I can open it in parallel and watch the execution unfold, the question of version matching remains. Of many versions of the class file in Git, how do I pick one that matches whatever is running on the device (or emulator)? This is more of a Git navigation question - how do I pick up the very version of the file that went into Android release, say, 2.2?

EDIT much later: now sources come prepackaged with Android SDK. This question is somewhat obsolete.

解决方案

This article nicely explains how to accomplish this: http://android.opensourceror.org/2010/01/18/android-source/

这篇关于在Eclipse中的Android框架源代码级调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆