How to view JS errors when accessing a webpage on Android mobile?
Steps to view JS errors:
- Open the Developer Options setting on your Android Device. If you are not able to see the developer option then you need to enable it.
- Select Enable USB Debugging.
- On your development machine (desktop), open Chrome.
- Open Dev Tools
- In Developer Tools, click the Main Menu then select More tools -> Remote devices. Check the screenshot below:
- In DevTools, open the Settings tab
- Make sure that the Discover USB devices checkbox is enabled or not. It should be enabled.
a. Go to your About Info of the device.
b. Tap Build number seven times. Once the developer option is activated, you will see a message, “You are now a developer!”
Connect your Android device directly to your development machine (desktop) using a USB cable. When the first time you do this, you usually see that DevTools has detected an unknown device. If you see green dot with the text Connected below the Android device model name, this means DevTools has successfully established the connection to your device. If your device is showing up as Unknown, accept the Allow USB Debugging permission prompt on your Android Mobile. After enabling USB debugging
- Now, Open Chrome browser on your Android device.
- In the Remote Devices tab, click the tab which matches your Android device model name. In a new tab input box, you need to add the URL of the web page which you want to inspect. It will open that URL in your connected android device.
Now, you can inspect that page using the inspect button in the front of your web page URL.
Sometimes, while inspecting you can face 404 not found error. Please check the screenshot:
To solve this you need to open chrome://inspect/#devices URL and choose to inspect fallback instead of inspect.
Leave A Comment