Eclipse Debug Android Tool-ddms

Source: Internet
Author: User

DDMS

The Android SDK provides DDMS commands separately, and we can enter DDMS in the [Android-sdk-home]/tools directory], and a separate DDMS window will pop up. Here we still use the eclipse integrated DDMS directly.

The full name of DDMS is the Dalvik Debug Monitor Service, which provides us with examples of screenshots for a test device, viewing running threads for a specific process and heap information, LOGCAT, broadcast status information, analog phone calls, receiving SMS, virtual geographic coordinates, and more.

In the upper-right corner of Eclipse, you can choose perspective. We chose Ddms,eclipse to enter the following layout tools-007:

In the upper left corner of the Devices tab, we select the current virtual machine: emulator-5554, which displays the contents of the current virtual machine. On the right side of the devices page, a row of shortcuts inside, there is a very important button "screen Capture", as the name implies, can be the current virtual machine picture to cut down. If the connection is not a virtual machine, but the real machine, you can also put the phone's current screen down. such as: tools-008

This is not much to say, to know that there is such a useful tool on the line.

Devices tab to the right of the Subwindow, with three tabs: Threads,heap,file Explorer

As the name implies, you can view the phone's thread condition, memory stack, and file status, respectively.

When you select the File Explorer tab, there are two useful buttons on the right, namely uploading files and downloading files. This feature can also be implemented separately with ADB. It's also a good choice here.

The bottom child window is logcat, which looks at the log of the currently connected phone. Look at the log and say no more. On the right side of the Log tab, there is a row of shortcuts. First choose the log level, from verbose to error, altogether 5 buttons. Then the right is the filter button, you can set the log filter, just see the log we want to see. Click on the green plus sign to get the following window: tools-009

The filter needs to take a name. Try to use meaningful names, and do not use AAA.

The log tag is the first log tag parameter that is used to classify the log when the log is output in the code. I generally prefer to use the current class name as the tag of log.

Pic is the process number where it is located. In the devices Subwindow, look at the online column, which is the PID number of each process.

Log level does not explain much, the person who hits the log should understand.

We tried to build a log filter. See system_process process PID, is 72,tag fill: activitymanager, such as: tools-010

After clicking OK, the log we see is the log of the system's activity management.

Finally, the middle of the emulator control Subwindow, describes a common feature: analog phone calls and receiving SMS.

such as: tools-011

Enter 10010, select Voice, click the "Call" button, DDMS will simulate 10010 this number to the virtual machine to make a telephone call. This time we can see that the virtual machine enters the incoming call status. We can operate the virtual machine to answer the call, and then go to emulator control to hang up the phone. The pleasure of this operation allows the reader to experience it himself. ^_^

Eclipse Debug Android Tool-ddms

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.