michael@0: // If frame.onStep returns {throw:}, an exception is thrown in the debuggee. michael@0: michael@0: load(libdir + "asserts.js"); michael@0: michael@0: var g = newGlobal(); michael@0: g.eval("function h() { debugger; }\n" + michael@0: "function f() {\n" + michael@0: " h();\n" + michael@0: " return 'fail';\n" + michael@0: "}\n"); michael@0: michael@0: var dbg = Debugger(g); michael@0: dbg.onDebuggerStatement = function (frame) { michael@0: frame.older.onStep = function () { return {throw: "pass"}; }; michael@0: }; michael@0: michael@0: assertThrowsValue(g.f, "pass");