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:
And if you step in, you get this, which isn’t very useful:
To fix that, go to Android SDK, find the API level you are using, and check the Sources for Android SDK box.
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:
It worked! Now you can debug into any Android code.