Helper Monkey to JavaScript's rescue?

A new project by Sun Microsystems is looking to tackle the problem of maintaining and debugging JavaScript code by bringing DTrace's tracing framework to the Web 2.0 table.

When I first started scripting in JavaScript it was mostly used as a fun language to change colours, create pop-up messages, make sure users filled out Web forms correctly, and attempt to create the same user-experience of a Web site across multiple browsers.

How times have changed.

JavaScript is being used in more complex fashions I would have never thought anyone would bother with a few years ago. The popularity of AJAX has no doubt been at the forefront of pushing JavaScript to a new level. The downside of this explosion in recent times has been the ability to maintain and debug JavaScript code easily.

There are a few good JavaScript debuggers out there and a few are integrated with popular IDEs but a new project, code-named Helper Monkey, led by Sun Microsystem's employee, Brendan Gregg, caught my eye.

Project Helper Monkey brings the power of DTrace, a tracing framework originally created by Sun for Solaris to JavaScript. Gregg says he is doing this by utilising user statically defined tracing interface(USDT) probes to the Spider Monkey JavaScript engine, used by Mozilla-based browsers.

According to Gregg he has added probe calls to "observe JavaScript function calls, object creation, and the destruction(garbage collection, and script execution. I've also written several DTrace scripts to report probe activity".

Unfortunately, the project is still very much in alpha mode and currently requires a complex set-up to get running but I'm keen to see where this project goes. For more information visit Brendan Gregg's blog.