Skip to content

Conversation

@roblourens
Copy link

This makes smartStep work with one thing missing.

When we toggle smart step, previously we called onPause again to do two things:

  • smartStep over the current frame, if needed
  • If not, resend the StoppedEvent so vscode will request the callstack again and it will be updated again with the current smart step info via origin

Doing this with the way things are now broken up is an interesting problem. I think this isn't critical and we can leave it out for now, but I'm curious whether you have any ideas about how to do that at all?

}

if ((await this._sourceMapTransformer.allSources(clientPath.canonicalized)).length) {
if ((await this._sourceMapTransformer.allSources(frame.location.script.runtimeSource.identifier.canonicalized)).length) {
Copy link
Owner

Choose a reason for hiding this comment

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

Is this equivalent to script.mappedSources.length?

Copy link
Author

Choose a reason for hiding this comment

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

Oh, probably

Copy link
Author

Choose a reason for hiding this comment

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

Fixed

@digeff
Copy link
Owner

digeff commented Jan 22, 2019

My original plan was to refactor the code to call that same logic, without going through OnPause

if (paused.reason !== 'other') return false;

const frame = paused.callFrames[0];
const mapping = await this._sourceMapTransformer.mapToAuthored(frame.location.script.url, frame.codeFlow.location.position.lineNumber, frame.codeFlow.location.position.columnNumber);
Copy link
Owner

Choose a reason for hiding this comment

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

Is this equivalent to frame.location.mappedToSource().resource.isMappedSource() ?

Copy link
Author

Choose a reason for hiding this comment

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

Oh, possibly

@digeff digeff force-pushed the v2_latest branch 4 times, most recently from 7c6a06b to f57c9f6 Compare March 5, 2019 21:45
@digeff digeff force-pushed the v2_latest branch 4 times, most recently from 376eb91 to ecf1223 Compare March 13, 2019 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants