Skip to content

Fixes #7366 Remove leaked breakpoint after stopping with run-to-cursor - #7367

Merged
Isidor Nikolic (isidorn) merged 1 commit into
microsoft:masterfrom
edumunoz:edumunoz/fix-leaking-bp-runcursor
Jun 15, 2016
Merged

Isidor Nikolic (isidorn) merged 1 commit into
microsoft:masterfrom
edumunoz:edumunoz/fix-leaking-bp-runcursor

Conversation

@edumunoz

Copy link
Copy Markdown

Add a listener for the exit event as well to remove the generated breakpoint in RunToCursorAction.

Isidor Nikolic (@isidorn) Andre Weinand (@weinand)

@mention-bot

Copy link
Copy Markdown

By analyzing the blame information on this pull request, we identified Isidor Nikolic (@isidorn) and Erich Gamma (@egamma) to be potential reviewers

@weinand

Copy link
Copy Markdown
Contributor

Ed Muñoz (@edumunoz) clearing the temporary breakpoints at the end of the session seems to be rather late. Shouldn't they be cleared on the next StoppedEvent?
If they are not shown in the UI (as you suggested), a user might lose track of them until the end of the section.

@edumunoz

Copy link
Copy Markdown
Author

clearing the temporary breakpoints at the end of the session seems to be rather late. Shouldn't they be cleared on the next StoppedEvent

That's already being done (onDidStop). However, that event is not being triggered if the debug session ends without stopping first. That's what this PR fixes.

If they are not shown in the UI (as you suggested), a user might lose track of them until the end of the section.

I consider these breakpoints an implementation detail. The user never set any breakpoints for this to work, so why show any?

@weinand

Copy link
Copy Markdown
Contributor

I'm in violent agreement that the 'run-to-cursor' breakpoints shouldn't be shown.

I had mis-interpreted the original problem: I thought the bug was that a 'run-to-cursor' breakpoint was not cleared immediately on the next stop if it was not hit. And your PR would clear those breakpoints only at the very end of the session (instead of at the next StoppedEvent). In that case a user might lose track of them if they not shown.

@isidorn Isidor Nikolic (isidorn) added this to the June 2016 milestone Jun 13, 2016
@isidorn

Copy link
Copy Markdown

Ed Muñoz (@edumunoz) thanks for the PR! Sorry for the slow response I was on vacation.
Looks good overall, however I would not expose onDidExitAdapter in rawDebugSessionas we already have onDidEvent. So in the action on you could listen on all events and if event.event = stopped or event.event = terminated or event.event = exit remove the brekapoint.

@edumunoz
Ed Muñoz (edumunoz) force-pushed the edumunoz/fix-leaking-bp-runcursor branch from 05b3539 to 494bbc0 Compare June 15, 2016 01:02
@edumunoz
Ed Muñoz (edumunoz) force-pushed the edumunoz/fix-leaking-bp-runcursor branch from 494bbc0 to d377857 Compare June 15, 2016 01:21
@isidorn
Isidor Nikolic (isidorn) merged commit 7b33662 into microsoft:master Jun 15, 2016
@isidorn

Copy link
Copy Markdown

Great work 🍻

@github-actions github-actions Bot locked and limited conversation to collaborators Mar 27, 2020
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.

5 participants