throws Exception {
Context context = Context.enter();
context.setOptimizationLevel(OPTIMIZATION_LEVEL);
context.setGeneratingDebug(true);
context.setCompileFunctionsWithDynamicScope(true);
context.setErrorReporter(new JSErrorReporter());
LocationTrackingDebugger locationTracker = new LocationTrackingDebugger();
if (!enableDebugger) {
//FIXME: add a "tee" debugger that allows both to be used simultaneously
context.setDebugger(locationTracker, null);