JSCommandlet [beta]

ScreenshotJSCommandlet is a new way to test out and debug JavaScript. It gives you the ability to jump into a simple console, inspect objects and events, and run bits of code. Some new browsers come equipped with a console out of the box while others (namely Internet Explorer) have left it out completely. This can be a problem when you want to dig inside your web pages. To get around this problem, we decided to share our own internal debugger with the wider development community.

JSCommandlet Bookmarklet
(left click to try it now, right click to save as bookmark)

To use JSCommandlet, simply right click the link above and save as a bookmark. Then, go to any website you would like to use JSCommandlet on and open the bookmark. The console will appear at the top of the screen!

Advantages

  • Runs in most browsers so you only have to remember how to use one console
  • It's a fancy bookmarklet so no installation is required
  • Operates in its own namespace so you don't have any global variable pollution
  • SiteCrafting hosts the bookmarklet so we'll continue to develop the source code and release updates

Sample Commands

Some things to try while you are playing around.

  • alert('Hello, World!') (This will pop up a dialog box)
  • inspect window (This will show you all your global variables)
  • inspect hello (This will show you a default global variable we set on this page)
  • $('headerNav').hide() (This will hide the search dialog box on the top right of this page using Prototype's hide function)
  • 1=a (This should cause an error)
  • Click here to cause an error.

Special Commands

The inspect function will display a list of all the properties which an object owns.
Usage: inspect [variable_name]
Example: inspect window

The exit/quit/close function will remove the console from the screen.
Usage: exit
Example: exit

The clear function will clear out the console log.
Usage: clear
Example: clear

Known Issues

  • Internal JSCommandlet variables appear instead of global variables. (For ease of development, many variables within JSCommandlet are restricted in scope, but not truly namespaced yet.)

Future Features

  • Ajax wrapper to inspect ajax activity
  • Multi-line input

Comments & Questions

If you have any feedback or want to talk to the developer please head over to our JSCommandlet blog post. Thanks!