Skip to content
This repository was archived by the owner on Oct 2, 2021. It is now read-only.

Conversation

@rakatyal
Copy link
Contributor

@rakatyal rakatyal commented Jun 21, 2018

…files

When we clear and reset the breakpoints in the mapped files, we don't persist the client IDs we created for them and sent to PineZorro. This specially causes a problem in Edge which returns a new breakpoint ID when we make the setBreakpointByUrl call again during resetting. Then we end up sending a 'changed' event to PZ for this breakpoint ID which causes an error since we didn't tell the client about it.

This doesn't cause an issue with Chrome currently because Chrome uses a pattern of script_url, line and column number to create the breakpoint ID which remains the same on resetting the breakpoint again.

This change persists the client IDs during the reset process and makes sure it gets mapped to the original one.

private _requestSeqToSetBreakpointsArgs: Map<number, ISavedSetBreakpointsArgs>;
private _allRuntimeScriptPaths: Set<string>;
private _authoredPathsToMappedBPs: Map<string, DebugProtocol.SourceBreakpoint[]>;
private _authoredPathsToClientBreakpointIds: Map<string, number[]>;
Copy link
Member

Choose a reason for hiding this comment

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

I hate that we have to keep track of the breakpoint IDs in here. But we're already keeping track of the breakpoints anyway. It's not great. Let me think about this a little more.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay let me know!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@roblourens: Did you get a chance to think about this yet?

@rakatyal
Copy link
Contributor Author

@digeff , @mrcrane FYI.

Copy link
Member

@roblourens roblourens left a comment

Choose a reason for hiding this comment

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

I'm not a fan of this fix but this is the best we can do right now, thanks for the PR

@roblourens roblourens merged commit 916b94f into microsoft:master Jun 30, 2018
@roblourens
Copy link
Member

@rakatyal please check the unit tests. VSTS isn't building PRs for some reason.

@roblourens roblourens added this to the July 2018 milestone Aug 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants