Home > Web Front-end > CSS Tutorial > Use Chrome to debug local web code on your phone

Use Chrome to debug local web code on your phone

高洛峰
Release: 2016-11-04 16:05:41
Original
2534 people have browsed it

Original translation content:

Host the site on your development computer's network server and then access the content from your Android device.

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

TL;DR

Port forwarding allows you to view web server content from your 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 the custom domain mapping domain.

Set up port forwarding

Port forwarding enables your Android device to access content on the web server of your development computer. Port forwarding works by mapping a TCP port on the Android device to a listening TCP port on the development machine. Communication between the ports travels over 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 your Android device. When you're done, you should see the Android Device Check Device dialog box and the Connection Status indicator on the left menu.

In the Check Devices dialog box in DevTools, enable port forwarding.

Click to add a rule.



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template