Problem

As with most current compile-to-JavaScript languages - ClojureScript presents some challenges for interactive debugging.  Source mapping can help us understand how our ClojureScript maps to JavaScript - but this alone is not enough. Being able to set breakpoints, step through code, and evaluate code in context greatly increases our ability to understand the nature of a particular programmer error.

The mature JavaScript runtimes have debugging APIs to support step-by-step debugging of JavaScript. Can we develop a common protocol that can be extended to the various APIs? 

WebKit Remote Debugging Protocol

Developer builds of Chrome now support a simple remote debugging protocol - JSON RPC over WebSockets. This protocol provides much of what is needed to build high quality debugging tools for ClojureScript. Coupled with source-mapping and analysis, it should be possible to develop sexpr level stepping and debugging of ClojureScript source.

http://www.webkit.org/blog/1620/webkit-remote-debugging/

http://code.google.com/chrome/devtools/docs/protocol/0.1/index.html

Rhino Debugging API

http://www.mozilla.org/rhino/rhino15R4-debugger.html

V8 Debugging Protocol

http://code.google.com/p/v8/wiki/DebuggerProtocol

References

Froglet: a source-level stepper for Lisp