blob: 306f7919e58023bd0b748bd823324c7731772e6a (
plain)
1
2
3
4
5
6
7
8
9
10
|
var g = newGlobal({newCompartment: true});
var dbg = new Debugger(g);
dbg.onDebuggerStatement = function (frame) {
var code = "assertEq(c, 'ok');\n";
assertEq(frame.evalWithBindings("eval(s)", {s: code, a: 1234}).return, undefined);
};
g.eval("function first() { return second(); }");
g.eval("function second() { return eval('third()'); }");
g.eval("function third() { debugger; }");
g.evaluate("first();");
|