Skip to content

Commit

Permalink
debug: allow adapters to be deprecated (#151973)
Browse files Browse the repository at this point in the history
  • Loading branch information
connor4312 committed Jun 14, 2022
1 parent 4dc7468 commit ca8a837
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/vs/workbench/contrib/debug/common/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,7 @@ export interface IDebuggerContribution extends IPlatformSpecificAdapterContribut
configurationSnippets?: IJSONSchemaSnippet[];
variables?: { [key: string]: string };
when?: string;
deprecated?: string;
uiMessages?: { [key in DebuggerUiMessage]: string };
}

Expand Down
5 changes: 5 additions & 0 deletions src/vs/workbench/contrib/debug/common/debugSchemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ export const debuggersExtPoint = extensionsRegistry.ExtensionsRegistry.registerE
type: 'string',
default: ''
},
deprecated: {
description: nls.localize('vscode.extension.contributes.debuggers.deprecated', "Optional message to mark this debug type as being deprecated."),
type: 'string',
default: ''
},
windows: {
description: nls.localize('vscode.extension.contributes.debuggers.windows', "Windows specific settings."),
type: 'object',
Expand Down
3 changes: 2 additions & 1 deletion src/vs/workbench/contrib/debug/common/debugger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ export class Debugger implements IDebugger, IDebuggerMetadata {
enumDescriptions: [this.label],
description: nls.localize('debugType', "Type of configuration."),
pattern: '^(?!node2)',
deprecationMessage: this.enabled ? undefined : debuggerDisabledMessage(this.type),
deprecationMessage: this.debuggerContribution.deprecated || (this.enabled ? undefined : debuggerDisabledMessage(this.type)),
doNotSuggest: !!this.debuggerContribution.deprecated,
errorMessage: nls.localize('debugTypeNotRecognised', "The debug type is not recognized. Make sure that you have a corresponding debug extension installed and that it is enabled."),
patternErrorMessage: nls.localize('node2NotSupported', "\"node2\" is no longer supported, use \"node\" instead and set the \"protocol\" attribute to \"inspector\".")
};
Expand Down

0 comments on commit ca8a837

Please sign in to comment.