DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Deployment
  4. Debugging Android: Using DDMS To Look Under The Hood

Debugging Android: Using DDMS To Look Under The Hood

James Sugrue user avatar by
James Sugrue
CORE ·
Oct. 20, 10 · Interview
Like (0)
Save
Tweet
Share
10.58K Views

Join the DZone community and get the full member experience.

Join For Free

While working on an Android application recently, I ran into some problems, and was finding it difficult to work out what was actually going on in the emulator. As I'm using Appcelerator for my app development, I didn't have the luxury of using the built in Eclipse tools to find out what was wrong. Luckily for me, Google have a tool for this type of situation: the Dalvik Debug Monitor.

You can invoke the debug monitor from the tools directory of your android SDK install using the ddms command.

Here's a summary of what the tool provides: 

Process View

When you first open DDMS, you will see a list of emulators on the left hand side. Each of these has a number of associated VMs running. Click on any of these VMs and you can view their information on the right hand side, including the threads and VM heap information. You can force garbage collection on any of the VMs at anytime using the trash can toolbar button.

You can also control the state of the emulator on the right hand side using the Emulator Control tab.  Here you can change items such as the voice and data telephony status. This is useful if you need to simulate roaming. You can even call your emulator, providing a source phone number. This section also has local controls to help you simulate location services, passing in you location using manual coordinates, GPX or KML.

File Explorer

The file explorer was the reason I booted up the debug monitor in the first place; I needed to see if a particular file I was providing with my app was included in the final apk that I sent to the device. Not only does the file explorer allow you to browse the emulator, but you can also push and pull files from the device, as well as deleting.  You can even create an SD card image for use in the emulator. When you're confused about what's getting included in your app, the file explorer is the place to go.

Device Log

The pane along the bottom presents you with the device log. Obviously this is really useful, particularly if you are not seeing enough information in your development tool.

Of course, the best way to get to know the tool is by using it. If you need to use the debug monitor, you will have your own specific use case, just as I did. I'm really impressed with the level of control and information in this tool. It's already helped me out with some very tricky problems.

 

Android (robot) File Explorer

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • A Gentle Introduction to Kubernetes
  • What Are the Different Types of API Testing?
  • Kubernetes-Native Development With Quarkus and Eclipse JKube
  • File Uploads for the Web (2): Upload Files With JavaScript

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: