debug: allow orphans to outlive their parents #169074
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, if a parent session was terminated but its children lived on, the UI would get into a broken state. Talking with @roblourens, we should probably support this, and doing so was disturbingly easy...
This PR unsets
parentSession
on the children when their parent is terminated. Generallysession.parentSession
was only checked and used synchronously, for example in the debug console switcher command. The area where this wasn't the case was in the REPLs. If a child previously merged its repl with its parent, then we'll clone the parent's repl and detach it into each child; I think keeping them connected would likely be confusing.The other change I tentatively put forward, is only bubbling restart and stop commands to the parent if
session.lifecycleManagedByParent
is true. I think this is more 'correct' but may result in surprising behavior for DA's who haven't yet adopted that property (like Python microsoft/vscode-python#20376)Fixes #130941
Fixes #164553