Port forwarding lets you view your local website, even it's hosted on a custom domain, directly on your android device.
Chrome to Phone my localhost URL from desktop
Remote Debug the mobile localhost page and enable port forwarding
Refresh and observe that no command line was needed!
Set up remote debugging between your development machine and your Android device. When you're finished, you should see your Android device in the list.
Click Port forwarding button.
localhost:8080
is set up by default.
Check Enable port forwarding. If you want to set up other ports, follow the steps 4 and 5. Otherwise skip to step 6.
In the Port textfield on the left, enter the
localhost
port number from which you want to be able to access the site on your Android device. For example, if you wanted to access the site fromlocalhost:5000
you would enter5000
.In the IP address and port textfield on the right, enter the IP address or hostname on which your site is running on your development machine's web server, followed by the port number. For example, if your site is running on
localhost:7331
you would enterlocalhost:7331
.Click Done.
You can read the full procedure on the official DevTools Documentation
Top comments (0)