summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Frame-environment-05.js
blob: 98f1c9a12624de390caaa37fd8b95f8a298d1e16 (plain)
1
2
3
4
5
6
7
8
9
// Test that Debugger.Frame.prototype.environment works at all pcs of a script
// with an aliased block scope.

var g = newGlobal();
var dbg = new Debugger(g);
dbg.onDebuggerStatement = function (frame) {
  frame.onStep = (function ()  { frame.environment; });
};
g.eval("debugger; for (let i of [1,2,3]) print(i);");