Seven Story Rabbit Hole

Sometimes awesome things happen in deep rabbit holes. Or not.

   images

Debugging Into Android Source

Debugging into the core Android source code can be useful. Here’s how to do it in Android Studio 0.8.2.

Starting out, if we hit a breakpoint where we have a sqlite database object:

screenshot

And if you step in, you get this, which isn’t very useful:

screenshot

To fix that, go to Android SDK, find the API level you are using, and check the Sources for Android SDK box.

screenshot

You must restart Android Studio at this point

Did you restart Android Studio? Now re-run your app in the debugger, and when you try to step into the database.execSQL() method, you should see this:

screenshot

It worked! Now you can debug into any Android code.

Comments