How to debug JavaScript code with mobile browsers

Android devices can be put into developer mode by going through settings>Phone status then tapping on “Build number” 7 times. This allows you to do a bunch of things (see step 5) including USB debugging. (Some devices might have Build number under Software Info)

To activate USB debugging, look in Settings for the newly appeared “{ } Developer Options”, open this and switch on USB debugging. Connect your device using a direct USB connection.

In Chrome on your desktop, in the usual developer tools panel used for debugging, look in the menu for more tools>remote devices. With Discover USB devices selected, you should now see your mobile device on the side.

Select it to see a list of all the chrome tabs you have open and the ability to enter URLs directly.

Selecting one of the links will open up a new window with a mirror of your device screen on the left and all the familiar chrome debug tools on the right. You can still control your device directly or use the mouse on the mirrored screen. It even rotates.

full details on remote debugging from google and how to enable developer mode (link as above) from askvg.com

Leave a Comment

tech