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

start debugger on restart action if it's not already running Issue: #24425 #39060

Closed
wants to merge 1 commit into from
Closed

start debugger on restart action if it's not already running Issue: #24425 #39060

wants to merge 1 commit into from

Conversation

Ross65536
Copy link

Allows the Ctrl + Shift + F5 keyboard shortcut to start a debugger if it's not already running.

@Ross65536 Ross65536 changed the title start debugger on restart action if it's not already running #24425 start debugger on restart action if it's not already running Issue: #24425 Nov 23, 2017
@isidorn
Copy link
Contributor

isidorn commented Nov 24, 2017

@Ross65536 thanks for your PR. However the current solution feels like a hack to me, you are simply adding a new keybinding which is not the point.
We also want to cover the scenario that no session is running, user opens the command palette and click on "Restart Debug".
So you should really follow the code pointer I gave and change the restart action that it starts debugging in case no session is running and not add a new shortcut.

@Ross65536
Copy link
Author

Ross65536 commented Nov 29, 2017

@isidorn To implement the feature as you've said I've been trying to turn the RestartAction class into a Decorator class that would, at construction time/runtime, 'transform' into either a StartAction or RestartAction instance based on whether the debugger is already running.

But I've run into the issue of StartAction needing an IWorkspaceContextService object to construct, which the RestartAction constructor doesn't receive, and which isn't available in any of the methods that build or 'register' RestartAction.

@isidorn
Copy link
Contributor

isidorn commented Nov 29, 2017

@Ross65536 no worries, I can also look into this.
imho no black magic is needed just a small change inside the RestartAction itself

@isidorn isidorn closed this May 11, 2018
@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.

None yet

2 participants