Commit 5c849290 authored by Kim-Anh Tran's avatar Kim-Anh Tran Committed by Commit Bot

[debug] Add CDP method to support skipLists

This adds CDP methods to support skipping locations
on stepOver and stepInto.

Bug: chromium:1105765
Change-Id: I8b902009883807082cf5fda0411b992e90dee81d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2335181Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69223}
parent ca3f16d0
......@@ -85,6 +85,13 @@ domain Debugger
integer lineNumber
integer columnNumber
# Location range within one script.
experimental type LocationRange extends object
properties
Runtime.ScriptId scriptId
ScriptPosition start
ScriptPosition end
# JavaScript call frame. Array of call frames form the call stack.
type CallFrame extends object
properties
......@@ -472,12 +479,17 @@ domain Debugger
# Debugger will pause on the execution of the first async task which was scheduled
# before next pause.
experimental optional boolean breakOnAsyncCall
# The skipList specifies location ranges that should be skipped on step into.
experimental optional array of LocationRange skipList
# Steps out of the function call.
command stepOut
# Steps over the statement.
command stepOver
parameters
# The skipList specifies location ranges that should be skipped on step over.
experimental optional array of LocationRange skipList
# Fired when breakpoint is resolved to an actual script and location.
event breakpointResolved
......
......@@ -1078,14 +1078,17 @@ Response V8DebuggerAgentImpl::resume(Maybe<bool> terminateOnResume) {
return Response::Success();
}
Response V8DebuggerAgentImpl::stepOver() {
Response V8DebuggerAgentImpl::stepOver(
Maybe<protocol::Array<protocol::Debugger::LocationRange>> inSkipList) {
if (!isPaused()) return Response::ServerError(kDebuggerNotPaused);
m_session->releaseObjectGroup(kBacktraceObjectGroup);
m_debugger->stepOverStatement(m_session->contextGroupId());
return Response::Success();
}
Response V8DebuggerAgentImpl::stepInto(Maybe<bool> inBreakOnAsyncCall) {
Response V8DebuggerAgentImpl::stepInto(
Maybe<bool> inBreakOnAsyncCall,
Maybe<protocol::Array<protocol::Debugger::LocationRange>> inSkipList) {
if (!isPaused()) return Response::ServerError(kDebuggerNotPaused);
m_session->releaseObjectGroup(kBacktraceObjectGroup);
m_debugger->stepIntoStatement(m_session->contextGroupId(),
......
......@@ -99,8 +99,11 @@ class V8DebuggerAgentImpl : public protocol::Debugger::Backend {
protocol::Binary* bytecode) override;
Response pause() override;
Response resume(Maybe<bool> terminateOnResume) override;
Response stepOver() override;
Response stepInto(Maybe<bool> inBreakOnAsyncCall) override;
Response stepOver(Maybe<protocol::Array<protocol::Debugger::LocationRange>>
inSkipList) override;
Response stepInto(Maybe<bool> inBreakOnAsyncCall,
Maybe<protocol::Array<protocol::Debugger::LocationRange>>
inSkipList) override;
Response stepOut() override;
Response pauseOnAsyncCall(std::unique_ptr<protocol::Runtime::StackTraceId>
inParentStackTraceId) override;
......
......@@ -463,7 +463,7 @@ void V8InspectorSessionImpl::resume(bool terminateOnResume) {
m_debuggerAgent->resume(terminateOnResume);
}
void V8InspectorSessionImpl::stepOver() { m_debuggerAgent->stepOver(); }
void V8InspectorSessionImpl::stepOver() { m_debuggerAgent->stepOver({}); }
std::vector<std::unique_ptr<protocol::Debugger::API::SearchMatch>>
V8InspectorSessionImpl::searchInTextByLines(StringView text, StringView query,
......
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