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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.