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

add a 'managedByParent' property to 'DebugSessionOptions' #128058

Closed
weinand opened this issue Jul 6, 2021 · 9 comments
Closed

add a 'managedByParent' property to 'DebugSessionOptions' #128058

weinand opened this issue Jul 6, 2021 · 9 comments
Assignees
Labels
api api-finalization debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@weinand
Copy link
Contributor

weinand commented Jul 6, 2021

When creating child debug sessions programmatically, we need a way to let VS Code know how to manage the lifecycle of the newly created children. Today lifecycle requests (like "restart") are sent to the session itself. But there are use cases where the parent should be in control.

/**
 * Options for {@link debug.startDebugging starting a debug session}.
 */
export interface DebugSessionOptions {

    /**
     ... other options
     */

    /**
     * Controls whether lifecycle requests like 'restart' are sent to the newly created session or its parent session.
     * By default (if the property is false or missing), lifecycle requests are sent to the new session.
     * This property is ignored if the session has no parent session.
     */
    managedByParent?: boolean;
}

@connor4312 does this proposed API and the wording makes sense to you?

@weinand weinand added feature-request Request for new features or functionality api debug Debug viewlet, configurations, breakpoints, adapter issues api-proposal labels Jul 6, 2021
@weinand weinand added this to the July 2021 milestone Jul 6, 2021
@weinand weinand self-assigned this Jul 6, 2021
@weinand weinand changed the title add a 'manageByParent' property to 'DebugSessionOptions' add a 'managedByParent' property to 'DebugSessionOptions' Jul 8, 2021
@connor4312
Copy link
Member

connor4312 commented Jul 8, 2021

Maybe it should be lifecycleManagedByParent?

@weinand
Copy link
Contributor Author

weinand commented Jul 13, 2021

I agree with @connor4312 that adding lifecycle to the proposed property makes it clearer what is being managed.

/**
 * Options for {@link debug.startDebugging starting a debug session}.
 */
export interface DebugSessionOptions {

    /**
     ... other options
     */

    /**
     * Controls whether lifecycle requests like 'restart' are sent to the newly created session or its parent session.
     * By default (if the property is false or missing), lifecycle requests are sent to the new session.
     * This property is ignored if the session has no parent session.
     */
    lifecycleManagedByParent?: boolean;
}

@weinand
Copy link
Contributor Author

weinand commented Jul 20, 2021

Proposal from above was discussed and approved on API call from July 13.

@weinand
Copy link
Contributor Author

weinand commented Jul 26, 2021

Since VS Code has not yet implemented this API, it does not make sense to verify it and add it to the release notes for the July 2021 release.
So I will move it to August 2021.

@weinand weinand modified the milestones: July 2021, August 2021 Jul 26, 2021
@weinand
Copy link
Contributor Author

weinand commented Aug 23, 2021

VS Code now supports the lifecycleManagedByParent API but testing this only makes sense with a debug adapter that creates child debug sessions.
@connor4312 I suggest that we test the lifecycleManagedByParent API with js-debug.

connor4312 added a commit to microsoft/vscode-js-debug that referenced this issue Aug 23, 2021
@connor4312
Copy link
Member

I've adopted this in js-debug. Now that we have explicit signaling here, should we create a debt item to remove the previous lifecycle handling heuristics that we added with compact sessions and whatnot?

@weinand
Copy link
Contributor Author

weinand commented Aug 23, 2021

@connor4312 you are proposing to remove the "lifecycle handling heuristics code" but not "compact sessions", right?

@connor4312
Copy link
Member

That's right

@weinand
Copy link
Contributor Author

weinand commented Aug 23, 2021

@connor4312 I've created debt item #131442 for this.

@weinand weinand added the verification-needed Verification of issue is requested label Aug 23, 2021
@connor4312 connor4312 added the verified Verification succeeded label Aug 23, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api api-finalization debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants
@weinand @connor4312 and others