Uiautomator remote debugging method

Source: Internet
Author: User

I have already introduced the method for compiling the uiautomator script, but the debug of the script has never been clarified. It is time-consuming to debug the script by logging, uiautomator has always supported remote debug, but it is not written in official documents, so it is rarely found in Chinese articles. through Google, it is found that there is a clear English article, after you have done it again, paste my process here and turn it into an original one.

English article in http://stackoverflow.com/questions/21978292/how-do-i-debug-uiautomator-scripts-with-eclipse

    • Create an instance in debug configration, as shown in the following two figures.




    • Make sure that ddms perspective is installed in eclipse.

    • Push the program to be debugged to/data/local/tmp/on the mobile phone end and perform the test. Add-e debug true to the parameter. The command line displays the output of "sending wait chunk", which is switched to ipvs.


    • On the left side of ddms perspective in eclipse, there is a process list. A process is marked with a red bug, and the last column has two port numbers, the second port number is the debug port we set earlier, indicating that the remote connection has been successful.


    • Go to the Java program editing page and place a breakpoint as needed. Debug configuration edited before start in debug configration


    • Well, the program has already stopped at the place where the previous breakpoint was located.





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.