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.