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

Use DAP's new "StackFrame.canRestart" property to enable the "Restart Frame" command #116345

Closed
weinand opened this issue Feb 10, 2021 · 5 comments
Assignees
Labels
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 on-release-notes Issue/pull request mentioned in release notes verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@weinand
Copy link
Contributor

weinand commented Feb 10, 2021

With microsoft/debug-adapter-protocol#147 a new optional property on the StackFrame has become available that indicates whether the "restart" request is available on a stack frame.

This feature request asks for using "StackFrame.canRestart" in VS Code.

I suggest this strategy:

  • if the DAP's supportsRestartRequest capability is true, the "Restart Frame" becomes available in the CALL STACK view's context menu
  • the "Restart Frame" command is enabled if a StackFrame has a canRestart property with value true or if the property is missing.

With this approach we make good use of the semantically overlapping properties supportsRestartRequest and canRestart by achieving UI stability.

/cc @connor4312 is this ok with you?

@weinand weinand added the debug Debug viewlet, configurations, breakpoints, adapter issues label Feb 10, 2021
@connor4312
Copy link
Member

Cool, thanks for the merge! I'll adopt this in js-debug today

@isidorn isidorn added the feature-request Request for new features or functionality label Feb 10, 2021
@isidorn isidorn added this to the February 2021 milestone Feb 10, 2021
@isidorn
Copy link
Contributor

isidorn commented Feb 10, 2021

@weinand makes good sense
@connor4312 let me know once this is in js-debug nightly so I can work on the client to show it. Or should it just be there tomorrow?

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

I've adopted it in the linked commit and it'll be in the next nightly

@isidorn
Copy link
Contributor

isidorn commented Feb 10, 2021

Great, thanks

@isidorn
Copy link
Contributor

isidorn commented Feb 11, 2021

As Andre suggested if the supportsRestartRequest we show the action.
And the stackFrame.canRestart controls if it is enabled or not.

Try it out and let me know what you think

@isidorn isidorn added the verification-needed Verification of issue is requested label Feb 11, 2021
@connor4312 connor4312 added the verified Verification succeeded label Feb 24, 2021
@isidorn isidorn added the on-release-notes Issue/pull request mentioned in release notes label Feb 26, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Mar 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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 on-release-notes Issue/pull request mentioned in release notes verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants
@weinand @isidorn @connor4312 and others