-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 node debugger as a plugin #3902
Conversation
The depreciation should happen only when the plugin system is complete and tested. This PR should not have any code changes to |
if (providers) { | ||
for (const provider of providers) { | ||
if (provider.resolveDebugConfiguration) { | ||
resolved = await provider.resolveDebugConfiguration(this.toWorkspaceFolder(workspaceFolderUri), debugConfiguration) || resolved; |
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.
Should not resolved
be passed instead of debugConfiguration
that next provider enhance a configuration from the previous provider?
Also, VS Code APIs are not very good at nullability, resolveDebugConfiguration
can return null
and undefined
in practice meaning that resolution failed. In this case iterating does not make sense and we should exit without checking other providers.
From docs for resolveDebugConfiguration
: The resolved debug configuration or undefined or null.
contributionId: string, | ||
debugConfiguration: theia.DebugConfiguration, | ||
folder: string | undefined): Promise<theia.DebugConfiguration | undefined> { | ||
async $resolveDebugConfigurations(debugConfiguration: theia.DebugConfiguration, workspaceFolderUri: string | undefined): Promise<theia.DebugConfiguration | undefined> { |
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.
@tolusha Do i understand correctly that this code is executed in Theia server worker? I wonder why we don't inject DebugService
and call provideDebugConfigurations/resolveDebugConfiguration
but reimplementing it here again?
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 code is executed in a dedicated plugin container and DebugService
is bind in Theia container.
Great work. I've removed nodejs extension from the browser app and deployed node and node2 vscode extensions via the plugin system. It works well and localization now is in place, very cool! |
Looking closely, removing Update |
8bd9103
to
04981d3
Compare
Signed-off-by: Anatoliy Bazko <abazko@redhat.com>
04981d3
to
d17e35a
Compare
@akosyakov it is ready to review again |
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.
@tolusha thanks, looks good
Signed-off-by: Anatoliy Bazko abazko@redhat.com
Reference issue
#3766
What does this PR do
Removes extension for node debugger