Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ export class PluginDebugService implements DebugService {
}, 100);

registerDebugConfigurationProvider(provider: PluginDebugConfigurationProvider): Disposable {
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;
}
}
Comment on lines +100 to +106
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

const handle = provider.handle;
this.configurationProviders.set(handle, provider);
this.fireOnDidConfigurationProvidersChanged();
Expand Down