Use of remote debugging Weinre

Source: Internet
Author: User

I. use

* In view of the browser debugging mobile page can not accurately reflect the actual mobile situation and can not be effectively debugged, it is often used remote debugging tools through the computer connected to the phone for debugging, commonly used remote debugging methods:

1.chrome Connection Andro Remote debugging

2.MAC Connection Apple Remote debugging

3. Use remote debugging tools, such as the protagonist --weinre of this document

Ii. weinre Installation

1. First install node globally on this machine

2. Start the command line tool to execute NPM Installer installation Weinre package

NPM Install Weinre-g (requires host support )

NPM install [email protected]-g (can be installed freely )

* After the installation is complete, the following interface is displayed, note that the installation path is preserved

Iii. using the weinre Debug page

1. Start the command line tool and start the weinre server

weinre--httpport 8081-boundhost 192.168.98.172

*The Httpport parameter is the beginning port

*boundhost parameter is native IP

* The server has been successfully started as follows

2. Open the browser and enter the weinre tool page

Address:http://192.168.98.172:8081

* Note that the corresponding address is opened according to your computer IP and port configuration

3. successfully open the interface as follows

* Below the interface has the following columns

--Copy the script in this column example to the page you want to debug and save the page changes.

4. on The weinre page of the computer , click on the Debug page, as follows:

The interface after opening

--then use the phone (must be in the same LAN as the computer) browser to open the Add weinre debug Script Tag page, at this time, refresh the weinre debugging interface, rendering the following interface:

--click the link shown in the arrows (select the link) to access the elements and console and the network to view the debugging tools for that page on your phone.

4. Open a local file using the Weinre server

* Just when installing weinre, there is an installation path, which is also a local folder that can be opened directly from the WEINRE server.

--The Web folder under this folder can place the project file you want to open, and then access the WEINRE server address through the browser to access the local file, where it is no longer a demonstration.

Use of remote debugging Weinre

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.