diff --git a/extensions/typescript-language-features/src/typescriptServiceClient.ts b/extensions/typescript-language-features/src/typescriptServiceClient.ts index db540f2e887..a42f5c29f06 100644 --- a/extensions/typescript-language-features/src/typescriptServiceClient.ts +++ b/extensions/typescript-language-features/src/typescriptServiceClient.ts @@ -25,7 +25,7 @@ import * as fileSchemes from './utils/fileSchemes'; import { Logger } from './utils/logger'; import { isWeb } from './utils/platform'; import { TypeScriptPluginPathsProvider } from './utils/pluginPathsProvider'; -import { PluginManager } from './utils/plugins'; +import { PluginManager, TypeScriptServerPlugin } from './utils/plugins'; import { TelemetryProperties, TelemetryReporter, VSCodeTelemetryReporter } from './utils/telemetry'; import Tracer from './utils/tracer'; import { inferredProjectCompilerOptions, ProjectType } from './utils/tsconfig'; @@ -656,7 +656,7 @@ export default class TypeScriptServiceClient extends Disposable implements IType }); } else { const args = previousState.type === ServerState.Type.Errored && previousState.error instanceof TypeScriptServerError - ? getReportIssueArgsForError(previousState.error, previousState.tsServerLogFile) + ? getReportIssueArgsForError(previousState.error, previousState.tsServerLogFile, this.pluginManager.plugins) : undefined; vscode.commands.executeCommand('workbench.action.openIssueReporter', args); } @@ -1014,6 +1014,7 @@ export default class TypeScriptServiceClient extends Disposable implements IType function getReportIssueArgsForError( error: TypeScriptServerError, logPath: string | undefined, + globalPlugins: readonly TypeScriptServerPlugin[], ): { extensionId: string; issueTitle: string; issueBody: string } | undefined { if (!error.serverStack || !error.serverMessage) { return undefined; @@ -1032,6 +1033,10 @@ function getReportIssueArgsForError( 3.`, ]; + if (globalPlugins.length) { + sections.push(`**Global TS Server Plugins**\n\n` + globalPlugins.map(plugin => `- \`${plugin.name}\``).join('\n')); + } + if (logPath) { sections.push(`**TS Server Log** @@ -1045,7 +1050,7 @@ The log file may contain personal data, including full paths and source code fro sections.push(`**TS Server Log** -❗️Server logging disabled. To help us fix crashes like this, please enable logging by setting: +❗️ Server logging disabled. To help us fix crashes like this, please enable logging by setting: \`\`\`json "typescript.tsserver.log": "verbose"