Mobile browser is not a developer tool, so debugging Mobile Web page is very troublesome. Using Chrome's remote debugging capabilities, you can debug your phone's pages like you would a desktop-side.
Get ready
- Mobile: Chrome for Android, install Google Chrome
- Desktop: Google Chrome, the version is recommended more than the mobile side, it is best to use the Canary
- USB Cable, which is the line of your charger
Turn on debug mode
Connect your PC with USB and turn on debug mode. With Android 4.2 or above the phone may not have debug mode options, you can find "Settings > About phone > Version number", point 7 times, and then return to the developer options. Note: I do not have Android 4.2 or above mobile phones, the above methods have not been tested, I just write according to official documents.
Find USB devices (Enable USB discovery in Chrome)
In your desktop version of Chrome, open menu > Tools > Check Device. Tick discover USB devices. Wait a moment, your phone will prompt you to allow debugging, accept debugging. After you accept debugging, you may need to wait for Chrome to detect your phone. If it is not detected, you can try restarting the browser.
Debugging
Once you've detected your phone, click Inspect, and the developer tools will pop up so you can debug your phone's page like a desktop page.
Chrome Remote Debugging
Reference links
Https://developer.chrome.com/devtools/docs/remote-debugging
Reprint: http://blog.allenice233.com/2014/07/28/chrome-remote-debug/
Chrome Remote Debugging Android pages using the desktop