blob: c5fd986bca585b10b37b981742e9abb260908991 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// Setting a breakpoint in a script we are no longer debugging is an error.
load(libdir + "asserts.js");
var g = newGlobal();
var dbg = Debugger();
var gobj = dbg.addDebuggee(g);
g.eval("function f() { return 2; }");
var s;
dbg.onDebuggerStatement = function (frame) { s = frame.eval("f").return.script; };
g.eval("debugger;");
s.setBreakpoint(0, {}); // ok
dbg.removeDebuggee(gobj);
assertThrowsInstanceOf(function () { s.setBreakpoint(0, {}); }, Error);
|