mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-23 19:59:37 +00:00
Include globally enabled TS Server plugins when reporting issues (#156510)
We're seeing a lot of crashes caused by TS Server plugins (usually those that come from extension). This will be easier to track down if we also include the enabled plugins when reporting issues
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user