Android framework source level debugging in Eclipse

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


the Java sources for the Android framework are available at 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: