v8/test/mjsunit/regress/regress-5071.js
Yang Guo 7c3748a9c4 [debug] load correct stack slot for frame details.
R=bmeurer@chromium.org
BUG=v8:5071

Review URL: https://codereview.chromium.org/2045863002 .

Cr-Commit-Position: refs/heads/master@{#36769}
2016-06-07 06:25:15 +00:00

27 lines
608 B
JavaScript

// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --expose-debug-as debug
var Debug = debug.Debug;
function listener(event, exec_state, event_data, data) {
assertEquals(2, exec_state.frameCount());
assertEquals("a", exec_state.frame(0).localName(0));
assertEquals("1", exec_state.frame(0).localValue(0).value());
assertEquals(1, exec_state.frame(0).localCount());
}
Debug.setListener(listener);
function f() {
var a = 1;
{
let b = 2;
debugger;
}
}
f();