How do I use the Ddms tool in Android Studio?

Source: Internet
Author: User

With the wide use of Android Studio , developers need to use the tools more prominently. Yesterday in an Android Studio Tutorial Web site, saw an article about the use of DDMS tools related knowledge, feel very good, share to everyone, take a look at it, new skills get walk ~ ~

First, we need to know what the Ddms tool is.

In fact, the DDMS (Dalvik Debug Monitor Service) is the Dalvik virtual Machine Debug Monitoring service in the Android development environment. What you can do is take a screenshot of your test device, see which threads are running in a particular itinerary, and heap information, LOGCAT, broadcast status information, analog phone calls, receive SMS, virtual geographic coordinates, and so on, which is a great tool for Android developers, and here's how to use it.

Android Studio Development tool, open DDMS, Concrete way

Open the window after

In addition to the features that are probably marked on the figure, detailed features include:

1.Devices: View all emulator details connected to DDMS, and the app process that each emulator is running, and the right side of each process corresponds to the port that is linked to the debugger.

2.Emulator control: To implement controls on the simulator, such as: answer the phone, according to the options to simulate a variety of network conditions, analog SMS sending and virtual address coordinates for testing GPS functions.

3.LogCat: Check the log input information, you can filter the log input filter Some debugging information filtering view and so on.

4.File exporler:file exporler File Browser, view the files in the Android emulator, can easily import/export files.

5.Heap: View memory usage in your app.

6.Dump HPROF File: Click the Dump HPROF Files button on the Ddms toolbar, select the file storage location, and then run Hprof-conv. You can use the mat to analyze the heap dumps start the mat and load the Hprof file that we just generated. Mat is a powerful tool to tell that all of its features are beyond the scope of this article, so I just want to demonstrate a way you can detect leaks: the histogram (histogram) view. It shows a list of class instances that can be sorted, including: Shallow heap (the sum of memory usage for all instances), or retained heap (the sum of memory allocated for all class instances, including all of their referenced objects).

7.Screen Captrue: screenshot operation

8.Thread: Check the threads of the process.

9. Other tools.

This may be said, not very intuitive, below we through the picture, to simply show a few of the use:

To view threads in a process:

To view memory information:

File management, you can import and export files, the real machine many operations may require root privileges to do. Simulator words can be simulated texting, calling, positioning and so on:

View the presentation and layout elements of a specific page:

The above only through the pictures show 4 features, because space is limited to introduce here, more features, we can in practice to slowly grope, if there is any new discoveries, or new skills, welcome to add to share.

Related article: How does the ListView control in Android work with the Adapter adapter? 》

How do I use the Ddms tool in Android Studio?

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.