Skip to content

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

Merged
merged 5 commits into from
Nov 6, 2020
Merged

Support Chrome SkipLists #1176

merged 5 commits into from
Nov 6, 2020

Conversation

grouma
Copy link
Member

@grouma grouma commented Nov 5, 2020

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.

@google-cla google-cla bot added the cla: yes label Nov 5, 2020
@grouma grouma requested a review from jacob314 November 5, 2020 20:19
@@ -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];
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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(
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why -2?

Copy link
Member Author

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,
) =>
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member

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:
Copy link
Member

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(the path override)

Copy link
Member Author

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.

Copy link
Member

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];
Copy link
Member

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(
Copy link
Member

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,
) =>
Copy link
Member

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:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@grouma grouma merged commit c30bae7 into master Nov 6, 2020
@grouma grouma deleted the skip-list branch November 6, 2020 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants