Bookmarklet: load local test script

Working on a data-loading application for a client, I got involved in some debugging work more complex than I was ready to handle with Firebug’s console. Access controls limited the problem script to running on the remote server, and (as I quickly tired of uploading new diagnostics) I went looking for a way to manipulate the test environment from my development computer. My answer was to create a mini-bookmarklet that would load and re-load a local test script, allowing me to update the test without needing to refresh the browser. So, in the proud tradition of bookmarklet design,

  var script=document.createElement('script');
      script.src = encodeURI(

To use this with your own tests, simply change the base path of the script (test-script.js in the example above) and paste a compressed version of the entire bookmarklet into your browser bar.

Let’s keep in touch

Reach out on Twitter or subscribe for (very) occasional updates.

Hey, I'm RJ: digital entomologist and intermittent micropoet, writing from the beautiful Rose City.