Error formatting macro: pagetree: java.lang.NullPointerException

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

Rhino Debugging API

http://www.mozillawebkit.org/rhinoblog/rhino15R4-debugger.html

V8 Debugging API

1620/webkit-remote-debugging/

http://code.google.com/pchrome/v8devtools/wiki/DebuggerProtocol

...

docs/protocol/0.1/index.html

Rhino Debugging API

http://www.webkitmozilla.org/blogrhino/1620/webkit-remote-debugging/rhino15R4-debugger.html

V8 Debugging API

http://code.google.com/chromep/devtoolsv8/docs/protocol/0.1/index.htmlwiki/DebuggerProtocol

References

Froglet: a source-level stepper for Lisp