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

fix: debug configuration provider replaces different provider #13196

Merged
merged 1 commit into from
Dec 21, 2023

Conversation

arekzaluski
Copy link
Contributor

What it does

This PR solves the problem when multiple plugins try to register debug configuration provider under the same handle number. Currently the old provider gets replaced. After this change the new number will be assigned.

Similar guard exists already in registerDebugAdapterContribution

How to test

Follow-ups

Review checklist

Reminder for reviewers

Signed-off-by: arekzaluski <arkadiusz.zaluski@arm.com>
Comment on lines +100 to +106
if (this.configurationProviders.has(provider.handle)) {
const configuration = this.configurationProviders.get(provider.handle);
if (configuration && configuration.type !== provider.type) {
console.warn(`Different debug configuration provider with type '${configuration.type}' already registered.`);
provider.handle = this.configurationProviders.size;
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Different way of solving it is the approach from registerDebugAdapterContribution. Instead of assigning a new handle number we can return Disposable.NULL

Copy link
Contributor

@planger planger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good to me! 👍

@JonasHelming
Copy link
Contributor

@thegecko If you merge now, it is the todays release :-)

@vince-fugnitto vince-fugnitto added the debug issues that related to debug functionality label Dec 21, 2023
@thegecko thegecko merged commit 118e514 into eclipse-theia:master Dec 21, 2023
14 checks passed
@vince-fugnitto vince-fugnitto added this to the 1.45.0 milestone Dec 21, 2023
arekzaluski added a commit to ARMmbed/theia that referenced this pull request Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debug issues that related to debug functionality
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

5 participants