Chrome has a web console that is incredibly useful for debugging websites. It’s really easy to access it on the desktop but the Android version of Chrome doesn’t seem to have one. In fact, debugging websites on a mobile web browser gets complicated because not many browsers have a built-in web console for debugging. If you use Chrome on your Android device though, you can get the console log for any website. The only catch is you’re also going to need to use your desktop for it. Anything goes here; Windows, Linux, or macOS, but you must have the Chrome browser installed on your desktop.
On your Android phone
On your Android phone, you need to do three things;
- Install Chrome.
- Enable Developer options. You can do this by going to the Settings app, finding System, and tapping the build number seven times.
- Enable USB Debugging. Go through the Developer options and enable USB debugging there.
Once you’ve done all of the above, open Chrome on your phone, and connect your phone to your computer via its data cable. If you’re prompted to, allow USB debugging on your phone. Go to the website you want to debug.
On your desktop
Open Chrome on your desktop. Paste the following in the URL bar and tap enter.
Your Android phone will show up here. Click the Inspect option under the tab you want to view the web console for.
A new window will open. You can interact with the Chrome browser on your Android phone via the left panel in this window or you can interact with it on your device so long as you do not disconnect it from your computer.
At the bottom right, you will see the console for it. When you’re done interacting with it and are ready to save the console log, right-click inside the console and select the save option. The log file is saved as LOG file but it can be viewed using any text editor of your choice.
This only works between Chrome browsers and not between Chromium-based browsers. Chromium-based browsers may have an internal page for devices but the chances that it detects Chrome on your Android phone, or any other browser on your Android phone are rather slim. If you need to test a website on a particular Chromium-based browser, you can try this trick and see if you have any luck but it is a Chrome-feature for the most part.