Closed ahoppen closed 2 weeks ago
@ahoppen I have this PR in progress which captures sourcekit-lsp output and includes it in a diagnostic bundle. How about I adapt it to use sourcekit-lsp diagnose
instead so we just have the one command? Using sourcekit-lsp diagnose
has the added benefit that if the user has sourcekit-lsp tracing turned off in the extension they'll still get the output.
I'll keep the current functionality in the PR for 5.10 and lower.
Verified with 3843201 on macOS and Linux
Starting with Swift 6, the
sourcekit-lsp diagnose
terminal command generates a bundle that helps SourceKit-LSP developers diagnose issues. I think it would be great if we could make that more accessible in VS Code by adding a command to the command palette that runssourcekit-lsp diagnose --toolchain /path/to/toolchain
in the integrated terminal. In particular, this could ensure that you run the command with the toolchain that is selected in VS Code, which yields more actionable bugs.As an added bonus, when sourcekitd crashes and SourceKit-LSP shows the
SourceKit-LSP: Restoring functionality: Please run 'sourcekit-lsp diagnose' to file an issue
status (you can reproduce this by runningkillall SourceKitService
when having a project open), it would be great if there was a button to runsourcekit-lsp diagnose
. I can add some indication to the work done progress that SourceKit-LSP sends for this.