Collection of Android debugging tools in eclipse-ddms

Source: Internet
Author: User

Original article, if reproduced, please indicate the source: http://blog.csdn.net/yihui823/article/details/6686578

 

Prerequisites: eclipse and ADT have been installed. The android SDK has been downloaded. In eclipse, you have already set the android SDK for this article.

This article introduces the android debugging tools. I hope it will be helpful to you.

 

Ddms

The android SDK provides ddms commands separately. We enter ddms in the [Android-SDK-Home]/tools directory, and an independent ddms window is displayed. Here we will directly use the ddms integrated with eclipse.

The full name of ddms is Dalvik debug monitor service, which provides us with a screenshot for the test device, for example, view running threads and heap information, logcat, broadcast status information, analog call, receive SMS, and virtual geographic coordinates for specific processes.

In the upper-right corner of Eclipse, you can select perspective. Select ddms and eclipse To Go To The following layout: Tools-007:

On the top left corner of the page, select the current Virtual Machine: emulator-5554 to display the content of the current virtual machine. On the right side of the devices tab, there is a very important button "screen capture" in the shortcut. As the name suggests, you can cut down the image of the current virtual machine. If the connection is not a virtual machine, but a real machine, the current screen of the mobile phone can also be taken down. For example, tools-008

This is not to mention. You only need to know such a useful tool.

The sub-window on the right of the devices tab has three tabs: threads, heap, and file explorer.

You can also view the thread, memory stack, and file status of the mobile phone.

When you select the file explorer tab, there are two useful buttons on the right: upload and download files. This function can also be implemented by using ADB alone. This is also a good choice.

The bottom sub-window is logcat. view the log of the currently connected mobile phone. I won't say much about reading logs. On the Right of the Log tab, there is a line of shortcuts. Select the log level, from verbose to error. There are 5 buttons in total. The Filter button is on the right. You can set the LOG filter conditions to view only the logs we want to view. Click the green plus sign to get the following window: Tools-009

A name is required for the filter. Try to use meaningful names instead of AAA.

Log tag is the first log tag parameter used to classify logs when logs are output in the code. In general, I like to use the current class name as the log tag.

PIC is the process ID. In the devices subwindow, the online column is the PID of each process.

The log level should not be explained much. The people playing the log should understand it.

We try to create a LOG filter. View the pid of the system_process process, which is 72. Set the tag to activitymanager, for example, tools-010.

After clicking OK, we can see that all the logs are related to system activity management.

Finally, the emulator control sub-window in the middle introduces a common function: Simulate calls and receive text messages.

For example, tools-011

Enter 10010, select voice, and click the "call" button. ddms simulates the 10010 number and calls the VM. At this time, we can see that the virtual machine enters the call status. We can operate the VM to answer the call and then stop the call in the emulator control. The pleasure of this operation allows readers to experience it themselves. Pai_^

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.