michael@0: // evalWithBindings code can assign to the bindings. michael@0: var g = newGlobal(); michael@0: var dbg = new Debugger(g); michael@0: var hits = 0; michael@0: dbg.onDebuggerStatement = function (frame) { michael@0: assertEq(frame.evalWithBindings("for (i = 0; i < 5; i++) {} i;", {i: 10}).return, 5); michael@0: hits++; michael@0: }; michael@0: michael@0: g.eval("debugger;"); michael@0: assertEq("i" in g, false); michael@0: assertEq(hits, 1);