Commit 7ebbe03e authored by Maya Lekova's avatar Maya Lekova Committed by Commit Bot

[test] Update inspector test expectations for await optimization

Bug: v8:8672
Change-Id: I3cd7319f81280447486b713b1b321f6e8ee099f6
Reviewed-on: https://chromium-review.googlesource.com/c/1405855
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58754}
parent 1ec1712c
......@@ -199,7 +199,6 @@ DEFINE_IMPLICATION(harmony_private_methods, harmony_private_fields)
// Features that are still work in progress (behind individual flags).
#define HARMONY_INPROGRESS_BASE(V) \
V(harmony_class_fields, "harmony fields in class literals") \
V(harmony_await_optimization, "harmony await taking 1 tick") \
V(harmony_private_methods, "harmony private methods in class literals") \
V(harmony_regexp_sequence, "RegExp Unicode sequence properties") \
V(harmony_weak_refs, "harmony weak references")
......@@ -239,7 +238,8 @@ DEFINE_IMPLICATION(harmony_private_methods, harmony_private_fields)
V(harmony_public_fields, "harmony public instance fields in class literals") \
V(harmony_static_fields, "harmony static fields in class literals") \
V(harmony_string_matchall, "harmony String.prototype.matchAll") \
V(harmony_object_from_entries, "harmony Object.fromEntries()")
V(harmony_object_from_entries, "harmony Object.fromEntries()") \
V(harmony_await_optimization, "harmony await taking 1 tick")
#ifdef V8_INTL_SUPPORT
#define HARMONY_SHIPPING(V) \
......
......@@ -200,6 +200,11 @@ test (testStepIntoAtReturn.js:144:14)
test (testStepIntoAtReturn.js:143:14)
(anonymous) (:0:0)
test (testStepIntoAtReturn.js:145:8)
-- async function --
test (testStepIntoAtReturn.js:143:14)
(anonymous) (:0:0)
floodWithTimeouts (testStepIntoAtReturn.js:136:15)
-- setTimeout --
floodWithTimeouts (testStepIntoAtReturn.js:137:10)
......@@ -207,3 +212,4 @@ floodWithTimeouts (testStepIntoAtReturn.js:137:10)
floodWithTimeouts (testStepIntoAtReturn.js:137:10)
test (testStepIntoAtReturn.js:142:8)
(anonymous) (:0:0)
stepOut async function
Running test: testTrivial
Check that we have proper async stack at return
bar (testTrivial.js:30:8)
-- async function --
bar (testTrivial.js:29:22)
foo (testTrivial.js:25:14)
-- async function --
foo (testTrivial.js:24:22)
test (testTrivial.js:20:14)
-- async function --
test (testTrivial.js:19:22)
(anonymous) (:0:0)
foo (testTrivial.js:26:6)
-- async function --
foo (testTrivial.js:24:22)
test (testTrivial.js:20:14)
-- async function --
test (testTrivial.js:19:22)
(anonymous) (:0:0)
test (testTrivial.js:21:6)
-- async function --
test (testTrivial.js:19:22)
(anonymous) (:0:0)
Running test: testStepOutPrecision
Check that stepOut go to resumed outer generator
bar (testStepOutPrecision.js:63:8)
-- async function --
bar (testStepOutPrecision.js:62:22)
foo (testStepOutPrecision.js:57:14)
-- async function --
foo (testStepOutPrecision.js:56:22)
test (testStepOutPrecision.js:50:14)
-- async function --
test (testStepOutPrecision.js:49:14)
(anonymous) (:0:0)
foo (testStepOutPrecision.js:58:8)
-- async function --
foo (testStepOutPrecision.js:56:22)
test (testStepOutPrecision.js:50:14)
-- async function --
test (testStepOutPrecision.js:49:14)
(anonymous) (:0:0)
test (testStepOutPrecision.js:51:8)
-- async function --
test (testStepOutPrecision.js:49:14)
(anonymous) (:0:0)
floodWithTimeouts (testStepOutPrecision.js:42:15)
-- setTimeout --
floodWithTimeouts (testStepOutPrecision.js:43:10)
-- setTimeout --
floodWithTimeouts (testStepOutPrecision.js:43:10)
-- setTimeout --
floodWithTimeouts (testStepOutPrecision.js:43:10)
-- setTimeout --
floodWithTimeouts (testStepOutPrecision.js:43:10)
test (testStepOutPrecision.js:48:8)
(anonymous) (:0:0)
test (testStepOutPrecision.js:52:8)
-- async function --
test (testStepOutPrecision.js:49:14)
(anonymous) (:0:0)
floodWithTimeouts (testStepOutPrecision.js:42:15)
-- setTimeout --
floodWithTimeouts (testStepOutPrecision.js:43:10)
-- setTimeout --
floodWithTimeouts (testStepOutPrecision.js:43:10)
-- setTimeout --
floodWithTimeouts (testStepOutPrecision.js:43:10)
-- setTimeout --
floodWithTimeouts (testStepOutPrecision.js:43:10)
-- setTimeout --
floodWithTimeouts (testStepOutPrecision.js:43:10)
test (testStepOutPrecision.js:48:8)
(anonymous) (:0:0)
Running test: testStepIntoAtReturn
Check that stepInto at return go to resumed outer generator
bar (testStepIntoAtReturn.js:95:8)
-- async function --
bar (testStepIntoAtReturn.js:94:22)
foo (testStepIntoAtReturn.js:90:14)
-- async function --
foo (testStepIntoAtReturn.js:89:22)
test (testStepIntoAtReturn.js:84:14)
-- async function --
test (testStepIntoAtReturn.js:83:14)
(anonymous) (:0:0)
bar (testStepIntoAtReturn.js:96:6)
-- async function --
bar (testStepIntoAtReturn.js:94:22)
foo (testStepIntoAtReturn.js:90:14)
-- async function --
foo (testStepIntoAtReturn.js:89:22)
test (testStepIntoAtReturn.js:84:14)
-- async function --
test (testStepIntoAtReturn.js:83:14)
(anonymous) (:0:0)
foo (testStepIntoAtReturn.js:91:6)
-- async function --
foo (testStepIntoAtReturn.js:89:22)
test (testStepIntoAtReturn.js:84:14)
-- async function --
test (testStepIntoAtReturn.js:83:14)
(anonymous) (:0:0)
test (testStepIntoAtReturn.js:85:8)
-- async function --
test (testStepIntoAtReturn.js:83:14)
(anonymous) (:0:0)
test (testStepIntoAtReturn.js:86:6)
-- async function --
test (testStepIntoAtReturn.js:83:14)
(anonymous) (:0:0)
floodWithTimeouts (testStepIntoAtReturn.js:76:15)
-- setTimeout --
floodWithTimeouts (testStepIntoAtReturn.js:77:10)
-- setTimeout --
floodWithTimeouts (testStepIntoAtReturn.js:77:10)
test (testStepIntoAtReturn.js:82:8)
(anonymous) (:0:0)
Running test: testStepOverAtReturn
Check that stepOver at return go to resumed outer generator
bar (testStepIntoAtReturn.js:126:8)
-- async function --
bar (testStepIntoAtReturn.js:125:22)
foo (testStepIntoAtReturn.js:121:14)
-- async function --
foo (testStepIntoAtReturn.js:120:22)
test (testStepIntoAtReturn.js:115:14)
-- async function --
test (testStepIntoAtReturn.js:114:14)
(anonymous) (:0:0)
bar (testStepIntoAtReturn.js:127:6)
-- async function --
bar (testStepIntoAtReturn.js:125:22)
foo (testStepIntoAtReturn.js:121:14)
-- async function --
foo (testStepIntoAtReturn.js:120:22)
test (testStepIntoAtReturn.js:115:14)
-- async function --
test (testStepIntoAtReturn.js:114:14)
(anonymous) (:0:0)
foo (testStepIntoAtReturn.js:122:6)
-- async function --
foo (testStepIntoAtReturn.js:120:22)
test (testStepIntoAtReturn.js:115:14)
-- async function --
test (testStepIntoAtReturn.js:114:14)
(anonymous) (:0:0)
test (testStepIntoAtReturn.js:116:8)
-- async function --
test (testStepIntoAtReturn.js:114:14)
(anonymous) (:0:0)
test (testStepIntoAtReturn.js:117:6)
-- async function --
test (testStepIntoAtReturn.js:114:14)
(anonymous) (:0:0)
floodWithTimeouts (testStepIntoAtReturn.js:107:15)
-- setTimeout --
floodWithTimeouts (testStepIntoAtReturn.js:108:10)
-- setTimeout --
floodWithTimeouts (testStepIntoAtReturn.js:108:10)
test (testStepIntoAtReturn.js:113:8)
(anonymous) (:0:0)
Running test: testStepOutFromNotAwaitedCall
Checks stepOut from not awaited call
bar (testStepIntoAtReturn.js:160:8)
-- async function --
bar (testStepIntoAtReturn.js:159:22)
foo (testStepIntoAtReturn.js:154:8)
-- async function --
foo (testStepIntoAtReturn.js:153:22)
test (testStepIntoAtReturn.js:146:14)
-- async function --
test (testStepIntoAtReturn.js:145:14)
(anonymous) (:0:0)
test (testStepIntoAtReturn.js:147:8)
-- async function --
test (testStepIntoAtReturn.js:145:14)
(anonymous) (:0:0)
floodWithTimeouts (testStepIntoAtReturn.js:138:15)
-- setTimeout --
floodWithTimeouts (testStepIntoAtReturn.js:139:10)
-- setTimeout --
floodWithTimeouts (testStepIntoAtReturn.js:139:10)
test (testStepIntoAtReturn.js:144:8)
(anonymous) (:0:0)
// Copyright 2018 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: --harmony-await-optimization
let {session, contextGroup, Protocol} =
InspectorTest.start('stepOut async function');
session.setupScriptMap();
Protocol.Runtime.enable();
InspectorTest.runAsyncTestSuite([
async function testTrivial() {
InspectorTest.log('Check that we have proper async stack at return');
contextGroup.addInlineScript(`
async function test() {
await Promise.resolve();
await foo();
}
async function foo() {
await Promise.resolve();
await bar();
}
async function bar() {
await Promise.resolve();
debugger;
}`, 'testTrivial.js');
await runTestAndStepAction('stepOut');
},
async function testStepOutPrecision() {
InspectorTest.log('Check that stepOut go to resumed outer generator');
contextGroup.addInlineScript(`
function wait() {
return new Promise(resolve => setTimeout(resolve, 0));
}
function floodWithTimeouts(a) {
if (!a.stop)
setTimeout(floodWithTimeouts.bind(this, a), 0);
}
async function test() {
let a = {};
floodWithTimeouts(a)
await wait();
await foo();
await wait();
a.stop = true;
}
async function foo() {
await Promise.resolve();
await bar();
await wait();
}
async function bar() {
await Promise.resolve();
debugger;
await wait();
}`, 'testStepOutPrecision.js');
await runTestAndStepAction('stepOut');
},
async function testStepIntoAtReturn() {
InspectorTest.log('Check that stepInto at return go to resumed outer generator');
contextGroup.addInlineScript(`
function wait() {
return new Promise(resolve => setTimeout(resolve, 0));
}
function floodWithTimeouts(a) {
if (!a.stop)
setTimeout(floodWithTimeouts.bind(this, a), 0);
}
async function test() {
let a = {};
floodWithTimeouts(a)
await wait();
await foo();
a.stop = true;
}
async function foo() {
await Promise.resolve();
await bar();
}
async function bar() {
await Promise.resolve();
debugger;
}`, 'testStepIntoAtReturn.js');
await runTestAndStepAction('stepInto');
},
async function testStepOverAtReturn() {
InspectorTest.log('Check that stepOver at return go to resumed outer generator');
contextGroup.addInlineScript(`
function wait() {
return new Promise(resolve => setTimeout(resolve, 0));
}
function floodWithTimeouts(a) {
if (!a.stop)
setTimeout(floodWithTimeouts.bind(this, a), 0);
}
async function test() {
let a = {};
floodWithTimeouts(a)
await wait();
await foo();
a.stop = true;
}
async function foo() {
await Promise.resolve();
await bar();
}
async function bar() {
await Promise.resolve();
debugger;
}`, 'testStepIntoAtReturn.js');
await runTestAndStepAction('stepOver');
},
async function testStepOutFromNotAwaitedCall() {
InspectorTest.log('Checks stepOut from not awaited call');
contextGroup.addInlineScript(`
function wait() {
return new Promise(resolve => setTimeout(resolve, 0));
}
function floodWithTimeouts(a) {
if (!a.stop)
setTimeout(floodWithTimeouts.bind(this, a), 0);
}
async function test() {
let a = {};
floodWithTimeouts(a)
await wait();
await foo();
a.stop = true;
}
async function foo() {
let a = {};
floodWithTimeouts(a);
await Promise.resolve();
bar();
a.stop = true;
}
async function bar() {
await Promise.resolve();
debugger;
}`, 'testStepIntoAtReturn.js');
await runTestAndStepAction('stepOut');
}
]);
async function runTestAndStepAction(action) {
Protocol.Debugger.enable();
Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 128});
let finished =
Protocol.Runtime.evaluate({expression: 'test()', awaitPromise: true})
.then(() => false);
while (true) {
const r = await Promise.race([finished, waitPauseAndDumpStack()]);
if (!r) break;
Protocol.Debugger[action]();
}
await Protocol.Debugger.disable();
}
async function waitPauseAndDumpStack() {
const {params} = await Protocol.Debugger.oncePaused();
session.logCallFrames(params.callFrames);
session.logAsyncStackTrace(params.asyncStackTrace);
InspectorTest.log('');
return true;
}
......@@ -167,6 +167,36 @@ asyncF (test.js:17:13)
return r;#
})();
(anonymous) (test.js:4:64)
var arr1 = [1];
var promise = Promise.resolve(1).then(x => x * 2).then(x => x #/ 2);
Promise.resolve(1).then(x => x * 2).then(x => x / 2);
(anonymous) (test.js:4:67)
var arr1 = [1];
var promise = Promise.resolve(1).then(x => x * 2).then(x => x / 2#);
Promise.resolve(1).then(x => x * 2).then(x => x / 2);
(anonymous) (test.js:5:50)
var promise = Promise.resolve(1).then(x => x * 2).then(x => x / 2);
Promise.resolve(1).then(x => x * 2).then(x => x #/ 2);
promise = Promise.resolve(1).then(x => x * 2).then(x => x / 2);
(anonymous) (test.js:5:53)
var promise = Promise.resolve(1).then(x => x * 2).then(x => x / 2);
Promise.resolve(1).then(x => x * 2).then(x => x / 2#);
promise = Promise.resolve(1).then(x => x * 2).then(x => x / 2);
(anonymous) (test.js:6:60)
Promise.resolve(1).then(x => x * 2).then(x => x / 2);
promise = Promise.resolve(1).then(x => x * 2).then(x => x #/ 2);
var a = 1;
(anonymous) (test.js:6:63)
Promise.resolve(1).then(x => x * 2).then(x => x / 2);
promise = Promise.resolve(1).then(x => x * 2).then(x => x / 2#);
var a = 1;
Running test: testStepIntoAfterBreakpoint
testFunction (test.js:10:10)
......
Tests breakable locations in variable initializations.
Running test: testBreakLocations
Running test: testStepInto
function testFunction() {
var obj1 = |_|{a : 1};
var arr1 = |_|[1];
var promise = |_|Promise.|C|resolve(1).|C|then(x => x |_|* 2|R|).|C|then(x => x |_|/ 2|R|);
|_|Promise.|C|resolve(1).|C|then(x => x |_|* 2|R|).|C|then(x => x |_|/ 2|R|);
|_|promise = Promise.|C|resolve(1).|C|then(x => x |_|* 2|R|).|C|then(x => x |_|/ 2|R|);
var a = |_|1;
const x = |_|(a = 20);
var y = |_|(a = 100);
var z = |_|x + (a = 1) + (a = 2) + (a = 3) + |C|f();
function f() {
for (let { |_|x, |_|y } = |_|{ x: 0, y: 1 }; y |_|> 0; --|_|y) { let z = |_|x + y; }
|R|}
var b = obj1.|_|a;
|_|(async function asyncF() {
let r = |_|await Promise.|C|resolve(42);
|_|return r;|R|
|R|})|C|();
|_|return promise;|R|
}
(anonymous) (expr.js:0:0)
testFunction (test.js:2:13)
(anonymous) (expr.js:0:0)
function testFunction() {
var obj1 = #{a : 1};
var arr1 = [1];
testFunction (test.js:3:13)
(anonymous) (expr.js:0:0)
var obj1 = {a : 1};
var arr1 = #[1];
var promise = Promise.resolve(1).then(x => x * 2).then(x => x / 2);
testFunction (test.js:4:16)
(anonymous) (expr.js:0:0)
var arr1 = [1];
var promise = #Promise.resolve(1).then(x => x * 2).then(x => x / 2);
Promise.resolve(1).then(x => x * 2).then(x => x / 2);
testFunction (test.js:5:2)
(anonymous) (expr.js:0:0)
var promise = Promise.resolve(1).then(x => x * 2).then(x => x / 2);
#Promise.resolve(1).then(x => x * 2).then(x => x / 2);
promise = Promise.resolve(1).then(x => x * 2).then(x => x / 2);
testFunction (test.js:6:2)
(anonymous) (expr.js:0:0)
Promise.resolve(1).then(x => x * 2).then(x => x / 2);
#promise = Promise.resolve(1).then(x => x * 2).then(x => x / 2);
var a = 1;
testFunction (test.js:7:10)
(anonymous) (expr.js:0:0)
promise = Promise.resolve(1).then(x => x * 2).then(x => x / 2);
var a = #1;
const x = (a = 20);
testFunction (test.js:8:12)
(anonymous) (expr.js:0:0)
var a = 1;
const x = #(a = 20);
var y = (a = 100);
testFunction (test.js:9:10)
(anonymous) (expr.js:0:0)
const x = (a = 20);
var y = #(a = 100);
var z = x + (a = 1) + (a = 2) + (a = 3) + f();
testFunction (test.js:10:10)
(anonymous) (expr.js:0:0)
var y = (a = 100);
var z = #x + (a = 1) + (a = 2) + (a = 3) + f();
function f() {
f (test.js:12:24)
testFunction (test.js:10:44)
(anonymous) (expr.js:0:0)
function f() {
for (let { x, y } = #{ x: 0, y: 1 }; y > 0; --y) { let z = x + y; }
}
f (test.js:12:15)
testFunction (test.js:10:44)
(anonymous) (expr.js:0:0)
function f() {
for (let { #x, y } = { x: 0, y: 1 }; y > 0; --y) { let z = x + y; }
}
f (test.js:12:18)
testFunction (test.js:10:44)
(anonymous) (expr.js:0:0)
function f() {
for (let { x, #y } = { x: 0, y: 1 }; y > 0; --y) { let z = x + y; }
}
f (test.js:12:42)
testFunction (test.js:10:44)
(anonymous) (expr.js:0:0)
function f() {
for (let { x, y } = { x: 0, y: 1 }; y #> 0; --y) { let z = x + y; }
}
f (test.js:12:62)
testFunction (test.js:10:44)
(anonymous) (expr.js:0:0)
function f() {
for (let { x, y } = { x: 0, y: 1 }; y > 0; --y) { let z = #x + y; }
}
f (test.js:12:49)
testFunction (test.js:10:44)
(anonymous) (expr.js:0:0)
function f() {
for (let { x, y } = { x: 0, y: 1 }; y > 0; --#y) { let z = x + y; }
}
f (test.js:12:42)
testFunction (test.js:10:44)
(anonymous) (expr.js:0:0)
function f() {
for (let { x, y } = { x: 0, y: 1 }; y #> 0; --y) { let z = x + y; }
}
f (test.js:13:2)
testFunction (test.js:10:44)
(anonymous) (expr.js:0:0)
for (let { x, y } = { x: 0, y: 1 }; y > 0; --y) { let z = x + y; }
#}
var b = obj1.a;
testFunction (test.js:14:15)
(anonymous) (expr.js:0:0)
}
var b = obj1.#a;
(async function asyncF() {
testFunction (test.js:15:2)
(anonymous) (expr.js:0:0)
var b = obj1.a;
#(async function asyncF() {
let r = await Promise.resolve(42);
asyncF (test.js:16:12)
testFunction (test.js:18:4)
(anonymous) (expr.js:0:0)
(async function asyncF() {
let r = #await Promise.resolve(42);
return r;
asyncF (test.js:17:4)
let r = await Promise.resolve(42);
#return r;
})();
asyncF (test.js:17:13)
let r = await Promise.resolve(42);
return r;#
})();
(anonymous) (test.js:4:64)
var arr1 = [1];
var promise = Promise.resolve(1).then(x => x * 2).then(x => x #/ 2);
Promise.resolve(1).then(x => x * 2).then(x => x / 2);
(anonymous) (test.js:4:67)
var arr1 = [1];
var promise = Promise.resolve(1).then(x => x * 2).then(x => x / 2#);
Promise.resolve(1).then(x => x * 2).then(x => x / 2);
(anonymous) (test.js:5:50)
var promise = Promise.resolve(1).then(x => x * 2).then(x => x / 2);
Promise.resolve(1).then(x => x * 2).then(x => x #/ 2);
promise = Promise.resolve(1).then(x => x * 2).then(x => x / 2);
(anonymous) (test.js:5:53)
var promise = Promise.resolve(1).then(x => x * 2).then(x => x / 2);
Promise.resolve(1).then(x => x * 2).then(x => x / 2#);
promise = Promise.resolve(1).then(x => x * 2).then(x => x / 2);
(anonymous) (test.js:6:60)
Promise.resolve(1).then(x => x * 2).then(x => x / 2);
promise = Promise.resolve(1).then(x => x * 2).then(x => x #/ 2);
var a = 1;
(anonymous) (test.js:6:63)
Promise.resolve(1).then(x => x * 2).then(x => x / 2);
promise = Promise.resolve(1).then(x => x * 2).then(x => x / 2#);
var a = 1;
Running test: testStepIntoAfterBreakpoint
testFunction (test.js:10:10)
(anonymous) (expr.js:0:0)
var y = (a = 100);
var z = #x + (a = 1) + (a = 2) + (a = 3) + f();
function f() {
f (test.js:12:24)
testFunction (test.js:10:44)
(anonymous) (expr.js:0:0)
function f() {
for (let { x, y } = #{ x: 0, y: 1 }; y > 0; --y) { let z = x + y; }
}
// Copyright 2017 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: --harmony-await-optimization
let {session, contextGroup, Protocol} =
InspectorTest.start('Tests breakable locations in variable initializations.');
let source = `
function testFunction() {
var obj1 = {a : 1};
var arr1 = [1];
var promise = Promise.resolve(1).then(x => x * 2).then(x => x / 2);
Promise.resolve(1).then(x => x * 2).then(x => x / 2);
promise = Promise.resolve(1).then(x => x * 2).then(x => x / 2);
var a = 1;
const x = (a = 20);
var y = (a = 100);
var z = x + (a = 1) + (a = 2) + (a = 3) + f();
function f() {
for (let { x, y } = { x: 0, y: 1 }; y > 0; --y) { let z = x + y; }
}
var b = obj1.a;
(async function asyncF() {
let r = await Promise.resolve(42);
return r;
})();
return promise;
}
//# sourceURL=test.js`;
contextGroup.addScript(source);
session.setupScriptMap();
InspectorTest.runAsyncTestSuite([
async function testBreakLocations() {
Protocol.Debugger.enable();
let {params:{scriptId}} = await Protocol.Debugger.onceScriptParsed();
let {result:{locations}} = await Protocol.Debugger.getPossibleBreakpoints({
start: {lineNumber: 0, columnNumber : 0, scriptId}});
session.logBreakLocations(locations);
},
async function testStepInto() {
Protocol.Debugger.pause();
let fin = Protocol.Runtime.evaluate({
expression: 'testFunction()//# sourceURL=expr.js', awaitPromise: true}).then(() => false);
let result;
while (result = await Promise.race([fin, Protocol.Debugger.oncePaused()])) {
let {params:{callFrames}} = result;
session.logCallFrames(callFrames);
session.logSourceLocation(callFrames[0].location);
Protocol.Debugger.stepInto();
}
Protocol.Runtime.evaluate({expression: '42'});
await Protocol.Debugger.oncePaused();
await Protocol.Debugger.resume();
},
async function testStepIntoAfterBreakpoint() {
Protocol.Debugger.setBreakpointByUrl({lineNumber: 10, url: 'test.js'});
Protocol.Runtime.evaluate({
expression: 'testFunction()//# sourceURL=expr.js'});
await awaitPausedAndDump();
Protocol.Debugger.stepInto();
await awaitPausedAndDump();
await Protocol.Debugger.resume();
async function awaitPausedAndDump() {
let {params:{callFrames}} = await Protocol.Debugger.oncePaused();
session.logCallFrames(callFrames);
session.logSourceLocation(callFrames[0].location);
}
}
]);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment