Skip to content
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

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

Merged

Conversation

edumunoz
Copy link
Contributor

@edumunoz edumunoz commented Jun 7, 2016

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

@isidorn @weinand

@mention-bot
Copy link

By analyzing the blame information on this pull request, we identified @isidorn and @egamma to be potential reviewers

@weinand
Copy link
Contributor

weinand commented Jun 8, 2016

@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
Contributor Author

edumunoz commented Jun 8, 2016

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
Contributor

weinand commented Jun 8, 2016

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 isidorn added this to the June 2016 milestone Jun 13, 2016
@isidorn
Copy link
Contributor

isidorn commented Jun 14, 2016

@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 edumunoz force-pushed the edumunoz/fix-leaking-bp-runcursor branch from 05b3539 to 494bbc0 Compare June 15, 2016 01:02
@edumunoz edumunoz force-pushed the edumunoz/fix-leaking-bp-runcursor branch from 494bbc0 to d377857 Compare June 15, 2016 01:21
@isidorn isidorn merged commit 7b33662 into microsoft:master Jun 15, 2016
@isidorn
Copy link
Contributor

isidorn commented Jun 15, 2016

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