Open zrno opened 3 years ago
You just set it to a file path you'd want clangd to output tracing info (note that clangd won't create a directory, but it will create the file, or overwrite it).
If that fails that's definitely a bug and I can't test it at the moment, but you can also try setting CLANGD_TRACE
env variable while starting vscode. e.g: CLANGD_TRACE=/tmp/clangd_trace.json code /path/to/my/repo
when should the file be generated? Is it generated when I build a CMake target? Is it generated when I build using any compiler?
hmm, i hope you are aware that we are talking about clangd and not clang here.
it will be created once you start your editing session (i.e. vscode starts clangd)
yep, I am aware it is clangd. I am trying to find out if I am doing something wrong because the file doesn't get generated.
I did try this locally on Linux, and the setting works fine for me.
If you're not able to get it to work, could you share:
Note: Creating a file in that location manually from a terminal works.
Clangd server logs when I change the value of the settings and press enter:
Extension version: 0.1.11 VS Code version: Code 1.56.2 (054a9295330880ed74ceaedda236253b4f39a335, 2021-05-12T16:45:26.313Z) OS version: Linux x64 5.12.9-arch1-1
The performance trace file option is unrelated to LSP's $/setTrace method.
Clangd server logs when I change the value of the settings and press enter:
Did you restart clangd after changing the setting? (e.g. with the "restart clangd" command, or just by restarting vscode)
I didn't restart at all. Just entered a new value and pressed enter. Should I restart?
There is a setting in vs code for clangd: Trace. Names a file that clangd should log a performance trace to, in chrome trace-viewer JSON format.
I couldn't find any explanation about this. How do I trigger the generation of this file?