Remote Debugging JavaScript

Shaver and I have been talking about getting a decent mechanism for remote debugging a JavaScript session. I have been looking at JSSH. It’s a bit dated, but a great little Firefox/Mozilla extension that adds a huge amount of external flexibility, control and extensibility. The Watir-based web testing system for Firefox (called FireWatir) uses JSSH to control the current Firefox browsing session. The big downside to JSSH is that it has binary components, so you need to build it across platforms and Gecko versions. Yuck!

I have been working on a pure JavaScript version in my spare time, but I can throw that away now that ActiveState’s Shane Caraveo has released an early alpha (called SD Connect) of the same concept. Actually, Shane has a bit more than I had planned, but that doesn’t bother me. Comment’s on Shane’s post pointed me to the MozRepl project as well. I had heard of MozRepl a while ago and I’m kicking myself for forgetting about it.

My goals for remote debugging are a bit different than Shane’s, but there is plenty of overlap. I want to use remote JavaScript debugging to aid in Mozilla’s mobile browser development. I also want to use remote debugging for extension and XUL application development. I realize I may be the anomaly, but a Firebug-like component is _not_ my ideal debugger for chrome (application) JavaScript. For web content JavaScript, sure, but I have Heisenberg uncertainty issues with using a debugger that is itself in the system I am debugging. Therefore, I am very eager to start playing around with SD Connect and MozRepl.

Also, Yay for OpenKomodo spin-offs!

4 Comments

  1. Shawn Wilsher said,

    May 25, 2008 @ 11:31 pm

    I’m not a huge fan of the Firebug UI either to be honest :/

  2. Mihai Sucan said,

    May 26, 2008 @ 2:35 am

    I would suggest that the analysis for building remote JavaScript debuggers also includes the Scope API, provided by Opera Software, used by Dragonfly.

    It would be certainly very interesting if people could talk about browser “interoperability” in the context of debugging Web applications. Implementing a single specification, like the Scope API spec, would be a start.

    Additionally, the Scope API does not limit itself to remote JS debugging. It also allows full document inspection – DOM, CSS, and more. It’s quite an interesting project.

  3. Kim Sullivan said,

    May 26, 2008 @ 3:48 am

    How about implementing Opera’s Scope protocol, any plans for that? I know it’s not finished and publicized yet (unless I missed something), but if browser vendors converged on a single technology, I think that everyone would win (being able to remotely debug one and the same javascript application running in several different browsers using the same tools).

  4. robcee said,

    May 28, 2008 @ 1:53 pm

    I’ve tinkered with MozRepl before and it was pretty cool. It was one of the main reasons I decided jssh wasn’t terribly necessary to bring forward into Firefox2. Also, talking with Shaver about some of the event loop interactions jssh introduced made me wish for a better solution.

    Props to Shane for SdConnect!

RSS feed for comments on this post