Android framework source level debugging in Eclipse

天涯浪子 提交于 2019-12-05 00:16:47

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/3064406/android-framework-source-level-debugging-in-eclipse

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!