When I first tried to manage an sqlite database on an android device I was not sure about where I fail in it. Can I even insert the records into the database, or I fail only to read the data from it? So I started to search for possibilities to debug the database lifecycle.
The system stores databases in the /data/data/package_name/databases folder by default.
In a command line using the adb (Android Debug Bridge - found in the android sdk tools library) you can access the databases on a running emulator like below:
In this tutorial we will show you how you can easily debug a service.
Introduction
When you start a project with a service in it in debug mode, and you placed a breakpoint in a method of the service, the debugger will not stop.
Solution
The solution that works in almost all situation is to wait declaratively in the code for the debugger to attach. To do this, you have to make a call to:
android.os.Debug.waitForDebugger();
The breakpoint can be inserted at any line after this call.
As a complete example, the SoftKeyboard tutorial is enhanced with the call above: