diff options
Diffstat (limited to 'docs/dev')
-rw-r--r-- | docs/dev/README.md | 3 | ||||
-rw-r--r-- | docs/dev/debugging.md | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/docs/dev/README.md b/docs/dev/README.md index e81f1e74c..a394b8501 100644 --- a/docs/dev/README.md +++ b/docs/dev/README.md | |||
@@ -131,7 +131,8 @@ Logging is done by both rust-analyzer and VS Code, so it might be tricky to figu | |||
131 | 131 | ||
132 | Inside rust-analyzer, we use the standard `log` crate for logging, and `env_logger` for logging frontend. | 132 | Inside rust-analyzer, we use the standard `log` crate for logging, and `env_logger` for logging frontend. |
133 | By default, log goes to stderr, but the stderr itself is processed by VS Code. | 133 | By default, log goes to stderr, but the stderr itself is processed by VS Code. |
134 | `--log-file <PATH>` CLI argument allows logging to file. | 134 | `--log-file <PATH>` CLI argument allows logging to file. |
135 | Setting the `RA_LOG_FILE=<PATH>` environment variable will also log to file, it will also override `--log-file`. | ||
135 | 136 | ||
136 | To see stderr in the running VS Code instance, go to the "Output" tab of the panel and select `rust-analyzer`. | 137 | To see stderr in the running VS Code instance, go to the "Output" tab of the panel and select `rust-analyzer`. |
137 | This shows `eprintln!` as well. | 138 | This shows `eprintln!` as well. |
diff --git a/docs/dev/debugging.md b/docs/dev/debugging.md index 5876e71bc..48caec1d8 100644 --- a/docs/dev/debugging.md +++ b/docs/dev/debugging.md | |||
@@ -65,6 +65,11 @@ If you need to debug the server from the very beginning, including its initializ | |||
65 | } | 65 | } |
66 | ``` | 66 | ``` |
67 | 67 | ||
68 | However for this to work, you will need to enable debug_assertions in your build | ||
69 | ```rust | ||
70 | RUSTFLAGS='--cfg debug_assertions' cargo build --release | ||
71 | ``` | ||
72 | |||
68 | ## Demo | 73 | ## Demo |
69 | 74 | ||
70 | - [Debugging TypeScript VScode extension](https://www.youtube.com/watch?v=T-hvpK6s4wM). | 75 | - [Debugging TypeScript VScode extension](https://www.youtube.com/watch?v=T-hvpK6s4wM). |