How to Debug Remote Browsers

By  on  

It's super frustrating when bugs pop up only in a remote browser. Something about that user, that device, or that environment is different, but I don't know what! And of course, I can't recreate it on my local development machine.

The team at TrackJS came up with a cool way to connect and debug these remote browsers that we call RemoteJS. RemoteJS is a free service where you can attach a simplified JavaScript debugger to a remote browser. The debugger provides a remote console where you can see logs, url, network events, and execute commands. You can even pull a remote screenshot.

To use it, just create a new "debugger channel" for agents to connect to. Connecting the agent is with a JavaScript snippet to attach to the browser and establishes a websocket connection back to the web debugger. You can deploy it conditionally to catch an annoying heisenbug, perhaps activating if the `?debug` querystring is present. You can also execute it directly or as a bookmarklet if you can't do a deploy.

RemoteJS can help make the most frustrating kind of bugs a little less painful. Give it a try!

Todd Gardner

About Todd Gardner

Todd Gardner is a software entrepreneur and developer who has built multiple profitable products. He pushes for simple tools, maintainable software, and balancing complexity with risk. He is the cofounder of TrackJS and Request Metrics, where he helps thousands of developers build faster and more reliable websites. He also produces the PubConf software comedy show.

Recent Features

Incredible Demos

  • By
    Optimize Your Links For Print Using CSS — Show The URL

    When moving around from page to page in your trusty browser, you get the benefit of hovering over links and viewing the link's target URL in the status bar. When it comes to page printouts, however, this obviously isn't an option. Most website printouts...

  • By
    background-size Matters

    It's something that makes all men live in fear, and are often uncertain of. It's never spoken, but the curiosity is always there. Nine out of ten women agree in the affirmative. Advertisers do their best to make us feel inadequate but...

Discussion

  1. that’s kind of awesome

Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!