-
Notifications
You must be signed in to change notification settings - Fork 83
Support Chrome SkipLists #1176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Chrome SkipLists #1176
Conversation
@@ -574,7 +579,17 @@ class Debugger extends Domain { | |||
} else { | |||
// If we don't have source location continue stepping. | |||
if (_isStepping && (await _sourceLocation(e)) == null) { | |||
await _remoteDebugger.stepInto(); | |||
var frame = e.params['callFrames'][0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is params['callFrames']
an object from the webkit package? If so, can we use types here instead of map references?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's currently not typed unfortunately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But from the webkit inspection protocol lib? If so, can you open an issue to expose this?
/// See https://chromedevtools.github.io/devtools-protocol/tot/Debugger/#method-stepInto | ||
/// | ||
/// Can return a cached value. | ||
Future<List<Map<String, dynamic>>> compute( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this a list of a map of?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A skipList
is a list of LocationRanges
as defined by the Chrome DevTools protocol. See the link the doc comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you in-line that info in the dartdoc?
for (var location in locations) { | ||
// Convert to zero based and do not include the known location. | ||
var endLine = location.jsLocation.line - 1; | ||
var endColumn = location.jsLocation.column - 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why -2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Broke it out and added comments to make it clear.
int startColumn, | ||
int endLine, | ||
int endColumn, | ||
) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a nit, I don't like to use the shorthand syntax if the method body is more than one line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer the fat arrow because we are returning a map so the curly braces are less confusing imo. I can change it if you feel strongly though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no strong preference -
@@ -48,3 +48,7 @@ dev_dependencies: | |||
|
|||
executables: | |||
webdev: | |||
|
|||
dependency_overrides: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean to check this in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(the path override)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I updated the changelog so it's clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -574,7 +579,17 @@ class Debugger extends Domain { | |||
} else { | |||
// If we don't have source location continue stepping. | |||
if (_isStepping && (await _sourceLocation(e)) == null) { | |||
await _remoteDebugger.stepInto(); | |||
var frame = e.params['callFrames'][0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But from the webkit inspection protocol lib? If so, can you open an issue to expose this?
/// See https://chromedevtools.github.io/devtools-protocol/tot/Debugger/#method-stepInto | ||
/// | ||
/// Can return a cached value. | ||
Future<List<Map<String, dynamic>>> compute( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you in-line that info in the dartdoc?
int startColumn, | ||
int endLine, | ||
int endColumn, | ||
) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no strong preference -
@@ -48,3 +48,7 @@ dev_dependencies: | |||
|
|||
executables: | |||
webdev: | |||
|
|||
dependency_overrides: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This greatly reduces the number of back and forth step requests as Chrome will continue stepping until we hit a range not included in the provided
skipList
. Read more about the feature here.