Last Updated: January 21, 2021
· moak

Debugging JavaScript errors on iOS, android and other mobile devices

Just ran into a JavaScript bug on an iPhone that didn't occur on my regular browsers. Usually I will load up Safari but everything was fine there as well.

So I've discovered this neat website:
basically you start with the command :listen and it starts a remote debugging session. You will get a session ID which you can use by inserting the following script into your page

<script src=""></script>

When you visit your page now with the device experiencing the bug, you can access the console log from your development browser.
Now with some good ol' trys and catches you can start locating the source of the error.

    //execution of a chunk of code
    console.log('caught error in a chunk of code');

And as extra bonus, you can run JavaScript code as commands through the that will affect the device running the session. Mess about with jQuery and other fun JavaScript.

Here's a short intro by Remy Sharp

1 Response
Add your response

More advanced but not less comprehensible alternatives:
External Chrome Dev Tools:
External Firebug:

over 1 year ago ·