Chrome has a web console that is very useful for debugging websites. It’s easy to access it on the desktop but the Android version of Chrome doesn’t seem to have it. In fact, debugging websites on mobile web browsers is complicated because not many browsers have a default web console for debugging. However, if you use Chrome on an Android device, you can get console logs for any website. The only catch is that you also need to use a desktop for that. Whatever happens here; Windows, Linux, or macOS, but you must install the Chrome browser on your desktop.
On your Android cellphone
On your Android phone, you need to do three things;
- Install Chrome.
- Enable Developer options. You can do this by opening the Settings application, finding System, and tapping the build number seven times.
- Enable USB Debugging. Open the Developer options and enable USB debugging there.
After you have done all of the above, open Chrome on your mobile, and connect your mobile to your computer via the data cable. If prompted, allow USB debugging on your mobile. Open the website that 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 appear here. Click the Check option under the tab that you want to see the web console.
A new window will open. You can interact with the Chrome browser on your Android phone through the left panel in this window or you can interact with it on your device as long as you don’t disconnect it from your computer.
At the bottom right, you will see a console for that. After finishing interacting with it and ready to save the console log, right-click inside the console and select the save option. The log file is saved as a LOG file, but can be viewed using a text editor of your choice.
This only works between the Chrome browser and not between Chromium-based browsers. The chromium-based browser might have an internal page for the device but it’s likely that it detected Chrome on your Android phone, or another browser on your Android phone is rather slim. If you need to test a website on a specific Chromium-based browser, you can try this trick and see if you are lucky but this is a Chrome feature for the most part.