Debug your phone's webview with Chrome's inspect

Source: Internet
Author: User

with Chrome's inspect, you can debug the WebView on your phone because there's no better debugging tool, and Chrome provides a tool that makes it easier to see the elements on the real machine and debug. In fact, I do not know much about WebView, but after the experiment found that the mobile phone on the browser to run the page belongs to this category, that is, the normal work of the touch screen station.  Prerequisites:The latest version of the Chrome browser is installed on the 1.PC2. The latest version of the Chrome browser is installed on the phone Note: The lower version of the need to install the ADB itself, the high version of the use, so we still directly use the high version of Chrome bar steps:1. Mobile phone with data cable connected to the computer2. Turn on USB debugging on the phone (in the Setup developer options)3.PC Chrome Access Chrome://inspect (after visiting the URL will pop up a confirmation box on the phone, click Confirm, if not confirmed), if the connection is successful, will be displayed in chrome under the corresponding model of the phone, such as:4. In the Chrome browser on your phone, enter the URL where you want to view the page elements, such as www.baidu.com5. A page that can be inspected appears under the Chrome://inspect page on the PC, as shown in:Note: The number of tabs open on your mobile browser will display the data in a few red boxes, or you can enter a URL to open the connection in the box in the red box. Inspect: Click another popup to display the corresponding page, you can use to debugFocus Tab: Focused on this page, the phone will open this pageReload: Refresh, ReloadClose : Closes this page, the phone will be corresponding to close this page6. Click on the corresponding page to check the inspect, another pop-up chrome page can be used to debug the operation, the specific page is as follows:Description: This interface you should be very familiar with, can be used to debug, get elements, or change the page elements and other operations, you can also enter the URL in the Red box jump page, you can also operate the left side of the interface, mobile phone synchronization operation.  In addition, someone has encountered a popup is an empty Chrome page, did not get to the situation of the page, some people say that the first time to open the need to FQ, of course, there is no use of FQ on the Internet inspect method, if you encounter such a situation of their own test it.  now to the traditional app interface, I will only use the SDK comes with the uiautomatorviewer to see some properties of the element, but can not be debugged, if you have any good tools or methods can also recommend to me ~   Http://www.tuicool.com/articles/BZR3imUhttp://www.iunbug.com/archives/2013/06/05/817.html

Debug your phone's webview with Chrome's inspect

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.