page.title=Debugging @jd:body
The Android SDK provides most of the tools that you need to debug your applications. You need a JDWP-compliant debugger if you want to be able to do things such as step through code, view variable values, and pause execution of an application. If you are using Eclipse, a JDWP-compliant debugger is already included and there is no setup required. If you are using another IDE, you can use the debugger that comes with it and attach the debugger to a special port so it can communicate with the application VMs on your devices. The main components that comprise a typical Android debugging environment are:
adb acts as a middleman between a device and your development system. It provides various
device management capabilities, including moving and syncing files to the emulator, running a
UNIX shell on the device or emulator, and providing a general means to communicate with
connected emulators and devices.adb. DDMS can
capture screenshots, gather thread and stack information, spoof incoming calls and SMS
messages, and has many other features.adb device
daemon runs on the device or emulator and provides a means for the adb host daemon to
communicate with the device.jdb.Figure 1 shows how the various debugging tools work together in a typical debugging environment.
In addition to the main debugging tools, the Android SDK provides additional tools to help you debug and profile your applications: