Simple Debugging

The Android SDK includes a host of tools that you can use for debugging purposes. These tools are integrated with the Eclipse IDE (see Figure 2–15 for a small sample).

Image

Figure 2–15. Debugging tools that you can use while building Android applications

One of the tools that you use throughout Android development is LogCat. This tool displays the log messages you emit using android.util.Log, exceptions, System.out.println, and so on. AlthoughSystem.out.println works, and the messages appear in the LogCat window, to log messages from your application youshould use the android.util.Log class. This class defines the familiar informational, ...

Get Pro Android 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.