Skip to content
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

VSCode TypeScript extension writes tracing to the wrong directory on Mac OS #58178

Closed
jthemphill opened this issue Apr 13, 2024 · 1 comment
Closed
Labels
Duplicate An existing issue was already created

Comments

@jthemphill
Copy link

πŸ”Ž Search Terms

vscode typescript tracing directory mac os

πŸ•— Version & Regression Information

  • This is the behavior in VSCode 1.88.1 (current release).

⏯ Playground Link

No response

πŸ’» Code

My TypeScript extension output:

2024-04-12 16:51:56.804 [info] Starting TS Server
2024-04-12 16:51:56.804 [info] Using tsserver from: /Users/jhemphill/dev/retool_development/node_modules/typescript/lib/tsserver.js
2024-04-12 16:51:56.804 [info] Using Node installation from /opt/homebrew/Cellar/node/21.6.2_1/bin/node to run TS Server
2024-04-12 16:51:56.804 [info] <syntax> Trace directory: /Users/jhemphill/Library/Application Support/Code/logs/20240412T165155/window1/exthost/vscode.typescript-language-features/tsserver-log-oUzp3d
2024-04-12 16:51:56.804 [info] <syntax> Forking...
2024-04-12 16:51:56.804 [info] <syntax> Starting...
2024-04-12 16:51:56.804 [info] <semantic> Trace directory: /Users/jhemphill/Library/Application Support/Code/logs/20240412T165155/window1/exthost/vscode.typescript-language-features/tsserver-log-AhK1JV
2024-04-12 16:51:56.804 [info] <semantic> Forking...
2024-04-12 16:51:56.804 [info] <semantic> Starting...

πŸ™ Actual behavior

% ls /Users/jhemphill/Library/Application\ Support/Code/logs/20240412T164156/window1/exthost/vscode.typescript-language-features/tsserver-log-sCEEH6

shows that the directory is empty

The trace files are instead stored in

% ls /Users/jhemphill/Library/Application
trace.78527.json        trace.78529.json        trace.78781.json        trace.78782.json        trace.81322.json        trace.81323.json

πŸ™‚ Expected behavior

Trace files should be stored in /Users/jhemphill/Library/Application\ Support/Code/logs/20240412T164156/window1/exthost/vscode.typescript-language-features/tsserver-log-sCEEH6

Additional information about the issue

I believe the relevant lines of code are in this commit. I'm not sure if this commit necessarily broke trace directories for Mac OS, though. I think they might have been broken for a while, because a path which contains a space will turn into multiple shell arguments unless quoted.

microsoft/vscode@5170e1a

It's possible every entry in the args variable is properly shell-quoted later on down the line. But I suspect quoting is done ad-hoc, because farther down in the file I see a variable wrapped in quotes:

args.push('--npmLocation', `"${configuration.npmLocation}"`);

I think @mjbvz will know what to do, though!

@MichaelMitchell-at
Copy link

There's an open issue on the VSCode repo: microsoft/vscode#204678

@mjbvz mjbvz closed this as completed Apr 15, 2024
@mjbvz mjbvz added the Duplicate An existing issue was already created label Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

3 participants