Christopher Schuster (University of California, Santa Cruz)

Reification of Execution State in JavaScript: Implementing the Lively Debugger

Christopher Schuster

Master thesis. University of Potsdam. April 2012. .

As web pages evolve to complex software applications, the web authoring tools must evolve as well. The Lively system integrates development and deployment of applications into a collaborative, self-sustaining environment on the web. However, the JavaScript debugging tools in Lively are still incomplete due to the lack of a cross-browser debugging API that allows access to the runtime execution state without relying on plugins.

We achieved execution state reification by interpreting JavaScript on top of the underlying JavaScript VM. This does not affect the runtime performance of Lively because the interpreter is only used for code that explicitly requires access to the execution state. Seamless transitions between natively executed and interpreted code enable on-demand debugging with breakpoints and stepping.

The implementation of this approach showed that closures and other JavaScript features like dynamic evaluation cause problems when both modes of execution work together. These problems were solved for Lively by restricting these language features but a general purpose cross-browser debugger is topic of future work.