JS Errors On Android Browser

| By Webner

How to view JS errors when accessing a webpage on Android mobile?

Steps to view JS errors:

  1. 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.
    1. 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!”
  2. Select Enable USB Debugging.
  3. On your development machine (desktop), open Chrome.
  4. Open Dev Tools
  5. In Developer Tools, click the Main Menu then select More tools -> Remote devices. Check the screenshot below:
  6. JS errors

  7. In DevTools, open the Settings tab
  8. Make sure that the Discover USB devices checkbox is enabled or not. It should be enabled.
  9. JS errors2

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

  1. Now, Open Chrome browser on your Android device.
  2. 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.
  3. JS errors3

Now, you can inspect that page using the inspect button in the front of your web page URL.
By clicking the console tab you can check the javascript errors also.
JS errors4

Sometimes, while inspecting you can face 404 not found error. Please check the screenshot:
JS errors5
To solve this you need to open chrome://inspect/#devices URL and choose to inspect fallback instead of inspect.
JS errors6

Leave a Reply

Your email address will not be published. Required fields are marked *