Enabling Advanced Debugging

When you are testing in an emulator, the Eclipse Android Development Tools (ADT) plug-ins take care of setting everything up for you so you are able to use all the tools we're about to describe.

There are two things you need to know about debugging applications on a real device. The first is that the application must be set to be debuggable. This involves adding android:debuggable=“true” to the <application> tag in the AndroidManifest.xml file. Fortunately, ADT sets this for properly for you. When you're creating debug builds for the emulator or deploying directly from Eclipse to a device, this attribute is set to true by ADT. When you export your application to create a production version of it, ADT knows not to set ...

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.