-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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 "Install Debug Extension(s)" Action #103891
Add "Install Debug Extension(s)" Action #103891
Conversation
@bamurtaugh thanks a lot for creating this PR and congrats on your first contribution to VS Code core 🎉
Thanks! |
Let me know when this is ready for review - no hurries. |
@isidorn Sounds great, thank you! Hoping to get some time to work on it more this week. |
@isidorn Thank you again for all of the help and feedback! I worked to incorporate your suggestions. Please feel free to review again whenever you get a chance and let me know what you think. |
await this.showError(message); | ||
const actionList: IAction[] = []; | ||
|
||
actionList.push(new Action( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Action
looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
@@ -118,6 +120,7 @@ export class DebugService implements IDebugService { | |||
|
|||
this.viewModel = new ViewModel(contextKeyService); | |||
this.taskRunner = this.instantiationService.createInstance(DebugTaskRunner); | |||
this.commandService = this.instantiationService.createInstance(CommandService); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This way you are creating a new instance of the commandsService
, which we do not want. We use dependency injetion across our codebase so that different objects can get ahold of services.
So you shuold just change the debug service consuctor arguments to take an additional argument, something like
@ICommandService private readonly commandService: ICommandService
The @ is a special vscode annotation which means inject me with that service.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the insights here- I added @ICommandService private readonly commandService: ICommandService
as an argument to the constructor. Let me know what you think.
@bamurtaugh nice work. I have reviewed again and there is just one more thing which I commented in the code. |
@isidorn Thank you for reviewing again! I made some adjustments based on the last comment. |
Looks good, merging in. Thanks for this PR 👏 ☀️ |
Thank you for all your help, @isidorn! This has been a great learning experience, and it's really neat to have it merged in 😄 |
The error message that appears when an extension is missing that contributes a certain debug type may be confusing or unclear to newer users (i.e.
Configured debug type coreclr is not supported.
may not make it evident that the C# extension is missing in .NET development).I've added an
Install Debug Extension(s)
button that opens the Extensions view and filters bytag:debuggers @sort:installs
:A couple of outstanding questions:
Open launch.json
?This PR fixes #103719