Debug your local page code on your phone with chrome

Source: Internet
Author: User
Tags chrome devtools
Original translated content:

The host develops a Web site on the computer network server and then accesses the content from the Android device.

Using a USB cable and chrome DevTools, you can run the website from the development machine and then view the website on Android devices.

TL; DR

Port forwarding allows you to view Web server content from the development machine on your Android device.

If your Web server is using a custom domain, you can set up your Android device to access content using a custom domain mapping domain.

Set up port forwarding

Port forwarding enables your Android device to access content on a Web server that is developing a computer. Port forwarding works by setting up a TCP port on the Android device that is mapped to a port on the development machine to listen on. The communication between the ports travels through the USB connection between the Android device and the development computer, so the connection does not depend on your network configuration.

To enable port forwarding:

Set up remote debugging between your development machine and Android device. When you are done, you should see the Android Device Check Device dialog box and the connection status indicator on the left menu.

On the check device in the Devtools dialog box, enable port forwarding.

Click Add Rule.

  • Related Article

    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.