New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose TS server tracing #110534
Expose TS server tracing #110534
Conversation
} | ||
|
||
try { | ||
await vscode.commands.executeCommand('revealFileInOS', vscode.Uri.file(this.serverState.server.tsServerTraceDirectory)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied this from the server log handler, but it doesn't actually work. The command ignores its argument and reveals the current file (and only if a folder is open). Rather than fix it, I made the PR a draft until I get confirmation that we actually want a command (which I doubt).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's start by just logging the server trace directory instead of adding a command.
I imagine we'll usually be asking user to go through a set of steps to collect server traces. If we find that getting to the trace file itself is confusing, we revisit adding a command to simplify things
FYI @mjbvz |
@@ -216,6 +226,13 @@ export class TypeScriptServerSpawner { | |||
} | |||
} | |||
|
|||
if (configuration.enableTsServerTracing && !isWeb()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need a version check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought the server would silently ignore unsupported arguments.
} | ||
|
||
try { | ||
await vscode.commands.executeCommand('revealFileInOS', vscode.Uri.file(this.serverState.server.tsServerTraceDirectory)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's start by just logging the server trace directory instead of adding a command.
I imagine we'll usually be asking user to go through a set of steps to collect server traces. If we find that getting to the trace file itself is confusing, we revisit adding a command to simplify things
b7be087
to
3e9ef9f
Compare
Dropped the command commit. Let me know if you want to drop the documentation commit too. |
The failure looks unrelated to my change:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Just unmark it as a draft when it's ready to merge
Thanks @amcasey! |
* Add typescript.tsserver.enableTracing setting * Document typescript.tsserver.enableTracing setting
Support microsoft/TypeScript#41374
Three commits, in increasing order of visibility:
Feel free to reject any or all of them.