3740764cca
In the Chrome DevTools Protocol, the step actions are named StepOut, StepOver, and StepInto, but internally we used StepOut, StepNext, and StepIn instead. This change adjusts the naming to be consistent. Bug: chromium:901814, chromium:1162229 Change-Id: Id3502a1b0a4aadd94734ec3d1fef73c1782fa220 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2928510 Reviewed-by: Yang Guo <yangguo@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#74877}
33 lines
845 B
JavaScript
33 lines
845 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.
|
|
|
|
var Debug = debug.Debug;
|
|
var step_count = 0;
|
|
|
|
function listener(event, execState, eventData, data) {
|
|
if (event != Debug.DebugEvent.Break) return;
|
|
try {
|
|
var line = execState.frame(0).sourceLineText();
|
|
print(line);
|
|
var [match, expected_count, step] = /\/\/ B(\d) (\w+)$/.exec(line);
|
|
assertEquals(step_count++, parseInt(expected_count));
|
|
if (step != "Continue") execState.prepareStep(Debug.StepAction[step]);
|
|
} catch (e) {
|
|
print(e, e.stack);
|
|
quit(1);
|
|
}
|
|
}
|
|
|
|
Debug.setListener(listener);
|
|
|
|
async function f() {
|
|
var a = 1;
|
|
debugger; // B0 StepOver
|
|
print(1); // B1 StepOver
|
|
return a + // B2 StepOver
|
|
0; // B3 Continue
|
|
}
|
|
|
|
f();
|