diff --git a/docs/user/readme.adoc b/docs/user/readme.adoc index 0dfc12b5274..e00d14dfbdf 100644 --- a/docs/user/readme.adoc +++ b/docs/user/readme.adoc @@ -98,6 +98,16 @@ You'll need Cargo, nodejs and npm for this. Note that installing via `xtask install` does not work for VS Code Remote, instead you'll need to install the `.vsix` manually. +==== Troubleshooting + +Here are some useful self-diagnostic commands: + +* **Rust Analyzer: Show RA Version** shows the version of `rust-analyzer` binary +* **Rust Analyzer: Status** prints some statistics about the server, like the few latest LSP requests +* To enable server-side logging, run with `env RUST_LOG=info` and see `Output > Rust Analyzer Language Server` in VS Code's panel. +* To log all LSP requests, add `"rust-analyzer.trace.server": "verbose"` to the settings and look for `Server Trace` in the panel. +* To enable client-side logging, add `"rust-analyzer.trace.extension": true` to the settings and open the `Console` tab of VS Code developer tools. + === Language Server Binary Other editors generally require `rust-analyzer` binary to be in `$PATH`.