Open TS Server logs in editor if possible

In most cases, were are only interested in the tsserver.log file, not the additional typings installer logs
This commit is contained in:
Matt Bierner
2019-04-12 17:21:06 -07:00
parent 6401390a1e
commit e78a0ab37f

View File

@@ -413,6 +413,14 @@ export default class TypeScriptServiceClient extends Disposable implements IType
return false;
}
try {
const doc = await vscode.workspace.openTextDocument(vscode.Uri.file(this.serverState.server.tsServerLogFile));
await vscode.window.showTextDocument(doc);
return true;
} catch {
// noop
}
try {
await vscode.commands.executeCommand('revealFileInOS', vscode.Uri.file(this.serverState.server.tsServerLogFile));
return true;