The Debug mobile page is divided into two types
- When developing, the mobile device connects to the PC from the service
- Debug a page on a mobile device
Local Service for mobile phone connection to PC
In the development of mobile devices page, the usual chrome comes with the analog mobile device, but also need to have a real machine to test, instead of cloth to test service, then use the real machine test.
The first step: the phone connected to the computer's local area network, before the online search for the tutorial, it is possible that mobile phones and computers are using the company's wireless network, but this is not possible. The correct posture is to use a computer to share a network service, and then use the phone to connect to the computer network.
I use the WIN10 in the mobile hotspot, the computer using wireless connection network can also use this hotspot sharing, mobile phone connection on this network
The second step: local use of tools for local services, on the computer can use localhost:3000 access, mobile phones need to use IPV4 to access the network
Query computer IPV4 method, in the computer command line, input ipconfig can query to
IPV4 + 端口号You can access that page by typing it most in your mobile browser
Debug a page on your phone
PC and phone use Chrome browser
The first step: computer input chrome://inspect/#devices into waiting for phone insertion
The second step: the use of mobile phone data cable, connect the computer, pay attention to the phone to adjust to the USB debugging mode, each phone specific open location on Baidu Bar
Step three: Use the phone chrome to open the page you want to debug, this time you can see on the computer
The phone is in a connected state can be debugged, this time click Debugging, but found that the page has been in loading state, this time needs to FQ, after FQ, you can correctly open the page
Debug Mobile Page