Commit ed2e7eb9 authored by Aleksei Koziatinskii's avatar Aleksei Koziatinskii Committed by Commit Bot

inspector: removed deprecated Debugger.scheduleStepIntoAsync

This method was experimental and deprecated for a while.

R=dgozman@chromium.org

Bug: none
Change-Id: I7d5a13a83f36ecc7a92300f690dff5c8bb26f8de
Reviewed-on: https://chromium-review.googlesource.com/c/1354182Reviewed-by: 's avatarDmitry Gozman <dgozman@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57920}
parent f4775f1c
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
}, },
{ {
"domain": "Debugger", "domain": "Debugger",
"async": [ "scheduleStepIntoAsync" ],
"exported": ["SearchMatch", "paused.reason"] "exported": ["SearchMatch", "paused.reason"]
}, },
{ {
......
...@@ -545,11 +545,6 @@ ...@@ -545,11 +545,6 @@
"name": "resume", "name": "resume",
"description": "Resumes JavaScript execution." "description": "Resumes JavaScript execution."
}, },
{
"name": "scheduleStepIntoAsync",
"description": "This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and\nDebugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled\nbefore next pause. Returns success when async task is actually scheduled, returns error if no\ntask were scheduled or another scheduleStepIntoAsync was called.",
"experimental": true
},
{ {
"name": "searchInContent", "name": "searchInContent",
"description": "Searches for given string in script content.", "description": "Searches for given string in script content.",
......
...@@ -259,12 +259,6 @@ domain Debugger ...@@ -259,12 +259,6 @@ domain Debugger
# Resumes JavaScript execution. # Resumes JavaScript execution.
command resume command resume
# This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and
# Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled
# before next pause. Returns success when async task is actually scheduled, returns error if no
# task were scheduled or another scheduleStepIntoAsync was called.
experimental command scheduleStepIntoAsync
# Searches for given string in script content. # Searches for given string in script content.
command searchInContent command searchInContent
parameters parameters
......
...@@ -1004,16 +1004,6 @@ Response V8DebuggerAgentImpl::stepOut() { ...@@ -1004,16 +1004,6 @@ Response V8DebuggerAgentImpl::stepOut() {
return Response::OK(); return Response::OK();
} }
void V8DebuggerAgentImpl::scheduleStepIntoAsync(
std::unique_ptr<ScheduleStepIntoAsyncCallback> callback) {
if (!isPaused()) {
callback->sendFailure(Response::Error(kDebuggerNotPaused));
return;
}
m_debugger->scheduleStepIntoAsync(std::move(callback),
m_session->contextGroupId());
}
Response V8DebuggerAgentImpl::pauseOnAsyncCall( Response V8DebuggerAgentImpl::pauseOnAsyncCall(
std::unique_ptr<protocol::Runtime::StackTraceId> inParentStackTraceId) { std::unique_ptr<protocol::Runtime::StackTraceId> inParentStackTraceId) {
bool isOk = false; bool isOk = false;
......
...@@ -96,8 +96,6 @@ class V8DebuggerAgentImpl : public protocol::Debugger::Backend { ...@@ -96,8 +96,6 @@ class V8DebuggerAgentImpl : public protocol::Debugger::Backend {
Response stepOver() override; Response stepOver() override;
Response stepInto(Maybe<bool> inBreakOnAsyncCall) override; Response stepInto(Maybe<bool> inBreakOnAsyncCall) override;
Response stepOut() override; Response stepOut() override;
void scheduleStepIntoAsync(
std::unique_ptr<ScheduleStepIntoAsyncCallback> callback) override;
Response pauseOnAsyncCall(std::unique_ptr<protocol::Runtime::StackTraceId> Response pauseOnAsyncCall(std::unique_ptr<protocol::Runtime::StackTraceId>
inParentStackTraceId) override; inParentStackTraceId) override;
Response setPauseOnExceptions(const String16& pauseState) override; Response setPauseOnExceptions(const String16& pauseState) override;
......
...@@ -279,19 +279,6 @@ bool V8Debugger::asyncStepOutOfFunction(int targetContextGroupId, ...@@ -279,19 +279,6 @@ bool V8Debugger::asyncStepOutOfFunction(int targetContextGroupId,
return true; return true;
} }
void V8Debugger::scheduleStepIntoAsync(
std::unique_ptr<ScheduleStepIntoAsyncCallback> callback,
int targetContextGroupId) {
DCHECK(isPaused());
DCHECK(targetContextGroupId);
if (m_stepIntoAsyncCallback) {
m_stepIntoAsyncCallback->sendFailure(Response::Error(
"Current scheduled step into async was overriden with new one."));
}
m_targetContextGroupId = targetContextGroupId;
m_stepIntoAsyncCallback = std::move(callback);
}
void V8Debugger::pauseOnAsyncCall(int targetContextGroupId, uintptr_t task, void V8Debugger::pauseOnAsyncCall(int targetContextGroupId, uintptr_t task,
const String16& debuggerId) { const String16& debuggerId) {
DCHECK(targetContextGroupId); DCHECK(targetContextGroupId);
...@@ -393,11 +380,6 @@ void V8Debugger::handleProgramBreak( ...@@ -393,11 +380,6 @@ void V8Debugger::handleProgramBreak(
return; return;
} }
m_targetContextGroupId = 0; m_targetContextGroupId = 0;
if (m_stepIntoAsyncCallback) {
m_stepIntoAsyncCallback->sendFailure(
Response::Error("No async tasks were scheduled before pause."));
m_stepIntoAsyncCallback.reset();
}
m_breakRequested = false; m_breakRequested = false;
m_pauseOnAsyncCall = false; m_pauseOnAsyncCall = false;
m_taskWithScheduledBreak = nullptr; m_taskWithScheduledBreak = nullptr;
...@@ -973,8 +955,9 @@ void V8Debugger::asyncTaskFinishedForStack(void* task) { ...@@ -973,8 +955,9 @@ void V8Debugger::asyncTaskFinishedForStack(void* task) {
} }
void V8Debugger::asyncTaskCandidateForStepping(void* task, bool isLocal) { void V8Debugger::asyncTaskCandidateForStepping(void* task, bool isLocal) {
if (!m_pauseOnAsyncCall) return;
int contextGroupId = currentContextGroupId(); int contextGroupId = currentContextGroupId();
if (m_pauseOnAsyncCall && contextGroupId) { if (contextGroupId != m_targetContextGroupId) return;
if (isLocal) { if (isLocal) {
m_scheduledAsyncCall = v8_inspector::V8StackTraceId( m_scheduledAsyncCall = v8_inspector::V8StackTraceId(
reinterpret_cast<uintptr_t>(task), std::make_pair(0, 0)); reinterpret_cast<uintptr_t>(task), std::make_pair(0, 0));
...@@ -984,15 +967,6 @@ void V8Debugger::asyncTaskCandidateForStepping(void* task, bool isLocal) { ...@@ -984,15 +967,6 @@ void V8Debugger::asyncTaskCandidateForStepping(void* task, bool isLocal) {
} }
breakProgram(m_targetContextGroupId); breakProgram(m_targetContextGroupId);
m_scheduledAsyncCall = v8_inspector::V8StackTraceId(); m_scheduledAsyncCall = v8_inspector::V8StackTraceId();
return;
}
if (!m_stepIntoAsyncCallback) return;
DCHECK(m_targetContextGroupId);
if (contextGroupId != m_targetContextGroupId) return;
m_taskWithScheduledBreak = task;
v8::debug::ClearStepping(m_isolate);
m_stepIntoAsyncCallback->sendSuccess();
m_stepIntoAsyncCallback.reset();
} }
void V8Debugger::asyncTaskStartedForStepping(void* task) { void V8Debugger::asyncTaskStartedForStepping(void* task) {
......
...@@ -34,8 +34,6 @@ enum class WrapMode { kForceValue, kNoPreview, kWithPreview }; ...@@ -34,8 +34,6 @@ enum class WrapMode { kForceValue, kNoPreview, kWithPreview };
enum class V8InternalValueType { kNone, kEntry, kScope, kScopeList }; enum class V8InternalValueType { kNone, kEntry, kScope, kScopeList };
using protocol::Response; using protocol::Response;
using ScheduleStepIntoAsyncCallback =
protocol::Debugger::Backend::ScheduleStepIntoAsyncCallback;
using TerminateExecutionCallback = using TerminateExecutionCallback =
protocol::Runtime::Backend::TerminateExecutionCallback; protocol::Runtime::Backend::TerminateExecutionCallback;
...@@ -62,9 +60,6 @@ class V8Debugger : public v8::debug::DebugDelegate, ...@@ -62,9 +60,6 @@ class V8Debugger : public v8::debug::DebugDelegate,
void stepIntoStatement(int targetContextGroupId, bool breakOnAsyncCall); void stepIntoStatement(int targetContextGroupId, bool breakOnAsyncCall);
void stepOverStatement(int targetContextGroupId); void stepOverStatement(int targetContextGroupId);
void stepOutOfFunction(int targetContextGroupId); void stepOutOfFunction(int targetContextGroupId);
void scheduleStepIntoAsync(
std::unique_ptr<ScheduleStepIntoAsyncCallback> callback,
int targetContextGroupId);
void pauseOnAsyncCall(int targetContextGroupId, uintptr_t task, void pauseOnAsyncCall(int targetContextGroupId, uintptr_t task,
const String16& debuggerId); const String16& debuggerId);
...@@ -242,7 +237,6 @@ class V8Debugger : public v8::debug::DebugDelegate, ...@@ -242,7 +237,6 @@ class V8Debugger : public v8::debug::DebugDelegate,
void* m_taskWithScheduledBreak = nullptr; void* m_taskWithScheduledBreak = nullptr;
String16 m_taskWithScheduledBreakDebuggerId; String16 m_taskWithScheduledBreakDebuggerId;
std::unique_ptr<ScheduleStepIntoAsyncCallback> m_stepIntoAsyncCallback;
bool m_breakRequested = false; bool m_breakRequested = false;
v8::debug::ExceptionBreakState m_pauseOnExceptionsState; v8::debug::ExceptionBreakState m_pauseOnExceptionsState;
......
Checks Debugger.scheduleStepIntoAsync with setTimeout. Checks Debugger.pauseOnAsynCall with setTimeout.
Running test: testSetTimeout Running test: testSetTimeout
paused at: paused at:
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
let {session, contextGroup, Protocol} = InspectorTest.start('Checks Debugger.scheduleStepIntoAsync with setTimeout.'); let {session, contextGroup, Protocol} = InspectorTest.start('Checks Debugger.pauseOnAsynCall with setTimeout.');
session.setupScriptMap(); session.setupScriptMap();
Protocol.Debugger.enable(); Protocol.Debugger.enable();
InspectorTest.runAsyncTestSuite([ InspectorTest.runAsyncTestSuite([
...@@ -11,8 +11,10 @@ InspectorTest.runAsyncTestSuite([ ...@@ -11,8 +11,10 @@ InspectorTest.runAsyncTestSuite([
await Protocol.Debugger.oncePaused(); await Protocol.Debugger.oncePaused();
Protocol.Debugger.stepOver(); Protocol.Debugger.stepOver();
await waitPauseAndDumpLocation(); await waitPauseAndDumpLocation();
Protocol.Debugger.scheduleStepIntoAsync(); Protocol.Debugger.stepInto({breakOnAsyncCall: true});
Protocol.Debugger.stepOver(); let parentStackTraceId = await waitPauseAndDumpLocation();
Protocol.Debugger.pauseOnAsyncCall({parentStackTraceId});
Protocol.Debugger.resume();
await waitPauseAndDumpLocation(); await waitPauseAndDumpLocation();
await Protocol.Debugger.resume(); await Protocol.Debugger.resume();
}, },
...@@ -23,8 +25,10 @@ InspectorTest.runAsyncTestSuite([ ...@@ -23,8 +25,10 @@ InspectorTest.runAsyncTestSuite([
await Protocol.Debugger.oncePaused(); await Protocol.Debugger.oncePaused();
Protocol.Debugger.stepOver(); Protocol.Debugger.stepOver();
await waitPauseAndDumpLocation(); await waitPauseAndDumpLocation();
Protocol.Debugger.scheduleStepIntoAsync(); Protocol.Debugger.stepInto({breakOnAsyncCall: true});
Protocol.Debugger.stepOver(); let parentStackTraceId = await waitPauseAndDumpLocation();
Protocol.Debugger.pauseOnAsyncCall({parentStackTraceId});
await Protocol.Debugger.resume();
await waitPauseAndDumpLocation(); await waitPauseAndDumpLocation();
await Protocol.Debugger.resume(); await Protocol.Debugger.resume();
await waitPauseAndDumpLocation(); await waitPauseAndDumpLocation();
...@@ -38,8 +42,10 @@ InspectorTest.runAsyncTestSuite([ ...@@ -38,8 +42,10 @@ InspectorTest.runAsyncTestSuite([
await Protocol.Debugger.oncePaused(); await Protocol.Debugger.oncePaused();
Protocol.Debugger.stepOver(); Protocol.Debugger.stepOver();
await waitPauseAndDumpLocation(); await waitPauseAndDumpLocation();
Protocol.Debugger.scheduleStepIntoAsync(); Protocol.Debugger.stepInto({breakOnAsyncCall: true});
Protocol.Debugger.stepOver(); let parentStackTraceId = await waitPauseAndDumpLocation();
Protocol.Debugger.pauseOnAsyncCall({parentStackTraceId});
Protocol.Debugger.resume();
await waitPauseAndDumpLocation(); await waitPauseAndDumpLocation();
await Protocol.Debugger.resume(); await Protocol.Debugger.resume();
await InspectorTest.waitForPendingTasks(); await InspectorTest.waitForPendingTasks();
...@@ -50,8 +56,10 @@ InspectorTest.runAsyncTestSuite([ ...@@ -50,8 +56,10 @@ InspectorTest.runAsyncTestSuite([
await Protocol.Debugger.oncePaused(); await Protocol.Debugger.oncePaused();
Protocol.Debugger.stepOver(); Protocol.Debugger.stepOver();
await waitPauseAndDumpLocation(); await waitPauseAndDumpLocation();
Protocol.Debugger.scheduleStepIntoAsync(); Protocol.Debugger.stepInto({breakOnAsyncCall: true});
Protocol.Debugger.stepOver(); let parentStackTraceId = await waitPauseAndDumpLocation();
Protocol.Debugger.pauseOnAsyncCall({parentStackTraceId});
Protocol.Debugger.resume();
await waitPauseAndDumpLocation(); await waitPauseAndDumpLocation();
await Protocol.Debugger.resume(); await Protocol.Debugger.resume();
}, },
...@@ -60,7 +68,9 @@ InspectorTest.runAsyncTestSuite([ ...@@ -60,7 +68,9 @@ InspectorTest.runAsyncTestSuite([
Protocol.Debugger.pause(); Protocol.Debugger.pause();
Protocol.Runtime.evaluate({expression: 'setTimeout(() => 42, 0)'}); Protocol.Runtime.evaluate({expression: 'setTimeout(() => 42, 0)'});
await waitPauseAndDumpLocation(); await waitPauseAndDumpLocation();
Protocol.Debugger.scheduleStepIntoAsync(); Protocol.Debugger.stepInto({breakOnAsyncCall: true});
let parentStackTraceId = await waitPauseAndDumpLocation();
Protocol.Debugger.pauseOnAsyncCall({parentStackTraceId});
Protocol.Debugger.resume(); Protocol.Debugger.resume();
await waitPauseAndDumpLocation(); await waitPauseAndDumpLocation();
await Protocol.Debugger.resume(); await Protocol.Debugger.resume();
...@@ -68,8 +78,11 @@ InspectorTest.runAsyncTestSuite([ ...@@ -68,8 +78,11 @@ InspectorTest.runAsyncTestSuite([
]); ]);
async function waitPauseAndDumpLocation() { async function waitPauseAndDumpLocation() {
var message = await Protocol.Debugger.oncePaused(); var {params: {callFrames, asyncCallStackTraceId}} =
await Protocol.Debugger.oncePaused();
if (!asyncCallStackTraceId) {
InspectorTest.log('paused at:'); InspectorTest.log('paused at:');
await session.logSourceLocation(message.params.callFrames[0].location); await session.logSourceLocation(callFrames[0].location);
return message; }
return asyncCallStackTraceId;
} }
Checks Debugger.scheduleStepIntoAsync.
Running test: testScheduleErrors
paused at:
function testNoScheduledTask() {
#debugger;
return 42;
{
error : {
code : -32000
message : Current scheduled step into async was overriden with new one.
}
id : <messageId>
}
{
error : {
code : -32000
message : No async tasks were scheduled before pause.
}
id : <messageId>
}
paused at:
debugger;
#return 42;
}
Running test: testSimple
paused at:
function testSimple() {
#debugger;
Promise.resolve().then(v => v * 2);
paused at:
debugger;
#Promise.resolve().then(v => v * 2);
}
{
id : <messageId>
result : {
}
}
paused at:
debugger;
Promise.resolve().then(v => v #* 2);
}
Running test: testNotResolvedPromise
paused at:
var p = new Promise(resolve => resolveCallback = resolve);
#debugger;
p.then(v => v * 2);
paused at:
debugger;
p.#then(v => v * 2);
resolveCallback();
{
id : <messageId>
result : {
}
}
paused at:
debugger;
p.then(v => v #* 2);
resolveCallback();
Running test: testTwoAsyncTasks
paused at:
function testTwoAsyncTasks() {
#debugger;
Promise.resolve().then(v => v * 2);
{
id : <messageId>
result : {
}
}
paused at:
debugger;
Promise.resolve().then(v => v #* 2);
Promise.resolve().then(v => v * 4);
Running test: testTwoTasksAndGoToSecond
paused at:
function testTwoAsyncTasks() {
#debugger;
Promise.resolve().then(v => v * 2);
paused at:
debugger;
#Promise.resolve().then(v => v * 2);
Promise.resolve().then(v => v * 4);
paused at:
Promise.resolve().then(v => v * 2);
#Promise.resolve().then(v => v * 4);
}
{
id : <messageId>
result : {
}
}
paused at:
Promise.resolve().then(v => v * 2);
Promise.resolve().then(v => v #* 4);
}
Running test: testTwoAsyncTasksWithBreak
paused at:
function testTwoAsyncTasksWithBreak() {
#debugger;
Promise.resolve().then(v => v * 2);
paused at:
debugger;
#Promise.resolve().then(v => v * 2);
debugger;
{
id : <messageId>
result : {
}
}
paused at:
Promise.resolve().then(v => v * 2);
#debugger;
Promise.resolve().then(v => v * 4);
{
id : <messageId>
result : {
}
}
paused at:
debugger;
Promise.resolve().then(v => v #* 4);
}
Running test: testPromiseAll
paused at:
function testPromiseAll() {
#debugger;
Promise.all([ Promise.resolve(), Promise.resolve() ]).then(v => v * 2);
paused at:
debugger;
#Promise.all([ Promise.resolve(), Promise.resolve() ]).then(v => v * 2);
}
{
id : <messageId>
result : {
}
}
paused at:
debugger;
Promise.all([ Promise.resolve(), Promise.resolve() ]).then(v => v #* 2);
}
Running test: testWithBlackboxedCode
paused at:
function testBlackboxedCreatePromise() {
#debugger;
createPromise().then(v => v * 2);
paused at:
debugger;
#createPromise().then(v => v * 2);
}
{
id : <messageId>
result : {
}
}
paused at:
debugger;
createPromise().then(v => v #* 2);
}
// 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.
let {session, contextGroup, Protocol} = InspectorTest.start('Checks Debugger.scheduleStepIntoAsync.');
contextGroup.addScript(`
function testNoScheduledTask() {
debugger;
return 42;
}
function testSimple() {
debugger;
Promise.resolve().then(v => v * 2);
}
function testNotResolvedPromise() {
var resolveCallback;
var p = new Promise(resolve => resolveCallback = resolve);
debugger;
p.then(v => v * 2);
resolveCallback();
}
function testTwoAsyncTasks() {
debugger;
Promise.resolve().then(v => v * 2);
Promise.resolve().then(v => v * 4);
}
function testTwoAsyncTasksWithBreak() {
debugger;
Promise.resolve().then(v => v * 2);
debugger;
Promise.resolve().then(v => v * 4);
}
function testPromiseAll() {
debugger;
Promise.all([ Promise.resolve(), Promise.resolve() ]).then(v => v * 2);
}
function testBlackboxedCreatePromise() {
debugger;
createPromise().then(v => v * 2);
}
//# sourceURL=test.js`);
contextGroup.addScript(`
function createPromise() {
return Promise.resolve().then(v => v * 3).then(v => v * 4);
}
//# sourceURL=framework.js`)
session.setupScriptMap();
Protocol.Debugger.enable();
Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 128});
InspectorTest.runAsyncTestSuite([
async function testScheduleErrors() {
Protocol.Runtime.evaluate({ expression: 'testNoScheduledTask()' });
await waitPauseAndDumpLocation();
Protocol.Debugger.scheduleStepIntoAsync().then(InspectorTest.logMessage);
Protocol.Debugger.scheduleStepIntoAsync().then(InspectorTest.logMessage);
Protocol.Debugger.stepInto();
await waitPauseAndDumpLocation();
await Protocol.Debugger.resume();
},
async function testSimple() {
Protocol.Runtime.evaluate({ expression: 'testSimple()' });
await waitPauseAndDumpLocation();
Protocol.Debugger.stepOver();
await waitPauseAndDumpLocation();
Protocol.Debugger.scheduleStepIntoAsync().then(InspectorTest.logMessage);
Protocol.Debugger.stepInto();
await waitPauseAndDumpLocation();
await Protocol.Debugger.resume();
},
async function testNotResolvedPromise() {
Protocol.Runtime.evaluate({ expression: 'testNotResolvedPromise()' });
await waitPauseAndDumpLocation();
Protocol.Debugger.stepOver();
await waitPauseAndDumpLocation();
Protocol.Debugger.scheduleStepIntoAsync().then(InspectorTest.logMessage);
Protocol.Debugger.stepInto();
await waitPauseAndDumpLocation();
await Protocol.Debugger.resume();
},
async function testTwoAsyncTasks() {
Protocol.Runtime.evaluate({ expression: 'testTwoAsyncTasks()' });
await waitPauseAndDumpLocation();
Protocol.Debugger.scheduleStepIntoAsync().then(InspectorTest.logMessage);
Protocol.Debugger.resume();
await waitPauseAndDumpLocation();
await Protocol.Debugger.resume();
},
async function testTwoTasksAndGoToSecond() {
Protocol.Runtime.evaluate({ expression: 'testTwoAsyncTasks()' });
await waitPauseAndDumpLocation();
Protocol.Debugger.stepOver();
await waitPauseAndDumpLocation();
Protocol.Debugger.stepOver();
await waitPauseAndDumpLocation();
Protocol.Debugger.scheduleStepIntoAsync().then(InspectorTest.logMessage);
Protocol.Debugger.resume();
await waitPauseAndDumpLocation();
await Protocol.Debugger.resume();
},
async function testTwoAsyncTasksWithBreak() {
Protocol.Runtime.evaluate({ expression: 'testTwoAsyncTasksWithBreak()' });
await waitPauseAndDumpLocation();
Protocol.Debugger.stepOver();
await waitPauseAndDumpLocation();
Protocol.Debugger.scheduleStepIntoAsync().then(InspectorTest.logMessage);
Protocol.Debugger.resume();
await waitPauseAndDumpLocation();
Protocol.Debugger.scheduleStepIntoAsync().then(InspectorTest.logMessage);
Protocol.Debugger.resume();
await waitPauseAndDumpLocation();
await Protocol.Debugger.resume();
},
async function testPromiseAll() {
Protocol.Runtime.evaluate({ expression: 'testPromiseAll()' });
await waitPauseAndDumpLocation();
Protocol.Debugger.stepOver();
await waitPauseAndDumpLocation();
Protocol.Debugger.scheduleStepIntoAsync().then(InspectorTest.logMessage);
Protocol.Debugger.stepOver();
await waitPauseAndDumpLocation();
await Protocol.Debugger.resume();
},
async function testWithBlackboxedCode() {
Protocol.Runtime.evaluate({ expression: 'testBlackboxedCreatePromise()' });
await waitPauseAndDumpLocation();
Protocol.Debugger.stepOver();
await waitPauseAndDumpLocation();
await Protocol.Debugger.setBlackboxPatterns({patterns: ['framework\.js'] });
Protocol.Debugger.scheduleStepIntoAsync().then(InspectorTest.logMessage);
Protocol.Debugger.stepOver();
await waitPauseAndDumpLocation();
await Protocol.Debugger.resume();
}
]);
async function waitPauseAndDumpLocation() {
var message = await Protocol.Debugger.oncePaused();
InspectorTest.log('paused at:');
session.logSourceLocation(message.params.callFrames[0].location);
return message;
}
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