in html/css

Javascript console

Javascript is great when it works. When it doesn’t work, it can get you from happy to miserable in less time than it takes you to say XmlHttpRequest.

Today I just found (via Ajaxian) an interesting tool that I’m adding to my arsenal when it comes to figuring out what’s happening in javascript. Definitely an invaluable debugging tool. It is called JavaScript Shell. When you embed the script, you get a command line window where you can make javascript calls directly from inside your web page.

You can call any method, inspect objects (using props), see where DOM objects are (using blink), and the killer feature, in my view, is the autocompletion using the tab key! It also features a command history, which is very convenient to try variations of the same call.

And if that wasn’t enough, you can also use the script as a bookmarklet. There is a Firefox version, and an Internet Explorer version available from Curiosity is bliss (ported to IE by Julien Couvreur).

You should try the script for yourself.

This is a great tool to debug, or even try a few things quickly and this will be a good complement to the rails console. It sure beats having to reload the page!

  1. Thank you, Julien! I did also see your post about XmlHttpRequest and I was planning to give it a try before I blogged about it ;)
    You have a lot of great stuff on your blog, anyone reading this should really take a deep look (as I did).

  2. This was cool, but it could have done a lot more. I did a similar implementation and I was planning on making it the best until FireBug came out with a great JS console implementation. If you use Firefox, FireBug is the way to go. : )

  3. Indeed, Firebug is pretty cool, and so is JavaScript Debugger for Firefox. And for IE, I have had good success with MSE 6.0 I believe it is (from Microsoft).
    But a script like Java Console is a worthy addition to your arsenal. If one tool fails, an other might work. Plus no complicated setup.

Comments are closed.