You wrote perfect code, right? I thought so! Well, I have a secret to tell: I don't always write perfect code. When things don't go as planned, I have to figure out what is going on. To help developers in the dire situations of random application crashes, the ADT provides some valuable tools to help debug your application, including the Dalvik Debug Monitor Server (DDMS) and the Eclipse debugger.
Debugging is rarely fun. Thankfully, the Dalvik Debug Monitor Server (DDMS) provides the tools necessary to help you dig yourself out of a hole of bugs. DDMS is a debugging tool that provides the following features (among others):
DDMS can work with an emulator and with a connected device. DDMS is located in the Android SDK tools directory. In Chapter 4, you added the tools directory to your path; therefore, you should be able to access DDMS from the command line.
One of the most commonly used features in DDMS is the LogCat viewer, which lets you view the output of system log messages, as shown in Figure 7-10. This system log reports everything from basic information messages, which include the state of the application and device, to warning and error information. When you receive an Application Not Responding ...