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. Android and Windows Phone 7 - Part 3 – Debugging on the device

Android and Windows Phone 7 - Part 3 – Debugging on the device

Denzel D. user avatar by
Denzel D.
·
Sep. 08, 10 · Interview
Like (0)
Save
Tweet
Share
15.13K Views

Join the DZone community and get the full member experience.

Join For Free

If you are developing applications for a specific mobile platform, you will eventually feel the need to debug on an actual device.

Windows Phone 7

Currently, only a limited number of developers have the actual Windows Phone 7 device, therefore it is hard to say how the debugging experience is on the actual hardware.

When you are working on a Windows Phone 7 application, the debugging process is handled via a special release of the Zune software that detects and manages the connected Windows Phone 7 device. Currently it is only available to Microsoft employees and some developers in the United States that obtained WP7 devices for testing purposes. I would highly recommend taking a look at Shawn Wildermuth’s “Debugging on the Phone” blog post that describes the overall debug experience on the phone. Overall, it looks like there is no performance loss compared to debugging inside the emulator. Also, you can directly access hardware that is not otherwise accessible through the emulator – for example, the accelerometer.

Android

When you want to debug an application directly on Android, the first thing you have to do is prepare the device. In Settings, go to Application settings and select Development. Make sure that the USB debugging option is enabled.

Now you can connect the phone to the development machine. If this is the first time you are connecting the device, Windows (as you probably know, unless otherwise mentioned I am using a Windows machine for development) will start installing device drivers for your phone.

I was testing this with my Motorola Backflip (running Android OS 1.5) and here is what I got when I connected the device to the PC:

By default, the ADB (Android Debug Bridge) interface is not installed and you will have to find it on your own - specific to the device you are using. Once you install the proper drivers, you are readyto go. 

Launch Eclipse and create a sample Android application. Make sure that you are targetting the correct platform, since if, for example, you will select a version higher than the one used by your device, it will not be detected and you won't be able to lauch the debug session.

Right click on the project in the sidebar and select Properties.

 

Once you see the Properties dialog, select Run/Debug settings:

Select the current configuration and click on Edit. In the dialog that appears, select the Target tab and select the Manual option for Deployment Target Selection Mode.

Make sure that device is connected and click on Run. You will be prompted with a dialog that will ask you to select a debug target. If the driver is properly installed and device detected, you will see it listed:

 

Select the device and click OK. Now, the application should be installed on your device. You can see if it's there by checking the list of installed applications:

 

Once installed, you are able to track down it's progress and work with the help of DDMS (Dalvik Debug Monitor) that is bundled with the SDK and located in the tools folder.

Windows Phone Android (robot) mobile app

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Practical Example of Using CSS Layer
  • 10 Easy Steps To Start Using Git and GitHub
  • GitLab vs Jenkins: Which Is the Best CI/CD Tool?
  • Best CI/CD Tools for DevOps: A Review of the Top 10

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: