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

Fix using deleted handles #283

Merged
merged 2 commits into from
Feb 10, 2018

Conversation

digeff
Copy link
Contributor

@digeff digeff commented Feb 9, 2018

Before this fix we were sending the wrong filename, so the pending breakpoints weren't being deleted, so then after a refresh we tried to add them again, and they had associated old breakpoint handles that don't exist any more, causing issues for some clients

// If the file has unbound breakpoints, resolve them and return true
if (pendingBreakpoints !== undefined) {
await this._chromeDebugAdapter.resolvePendingBreakpoint(pendingBreakpoints);
this._chromeDebugAdapter.pendingBreakpointsByUrl.delete(source);
if (!this._chromeDebugAdapter.pendingBreakpointsByUrl.delete(normalizedSource)) {
logger.warn(`Expected to delete ${normalizedSource} from the list of pending breakpoints, but it wasn't there`);
Copy link
Member

Choose a reason for hiding this comment

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

Warnings appear to the user in the console, is that what you want? If so this should be written in terms the user will understand and tell them what to do about it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That wasn't my intention. I want this to appear in the log only. I'll change this to: logger.log

@roblourens roblourens merged commit 81b3d96 into microsoft:master Feb 10, 2018
@roblourens roblourens added this to the February 2018 milestone Mar 5, 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