diff --git a/crates/rust-analyzer/src/bin/args.rs b/crates/rust-analyzer/src/bin/args.rs index abc00d03bb..c5f8140216 100644 --- a/crates/rust-analyzer/src/bin/args.rs +++ b/crates/rust-analyzer/src/bin/args.rs @@ -57,6 +57,7 @@ FLAGS: ENVIRONMENTAL VARIABLES: RA_LOG Set log filter in env_logger format RA_PROFILE Enable hierarchical profiler + RA_WAIT_DBG If set acts like a --wait-dbg flag COMMANDS: diff --git a/crates/rust-analyzer/src/bin/main.rs b/crates/rust-analyzer/src/bin/main.rs index 0cddfecb57..80637cbfff 100644 --- a/crates/rust-analyzer/src/bin/main.rs +++ b/crates/rust-analyzer/src/bin/main.rs @@ -29,7 +29,7 @@ fn main() { fn try_main() -> Result<()> { let args = args::Args::parse()?; - if args.wait_dbg { + if args.wait_dbg || env::var("RA_WAIT_DBG").is_ok() { #[allow(unused_mut)] let mut d = 4; while d == 4 { diff --git a/docs/dev/debugging.md b/docs/dev/debugging.md index 8c48fd5a1f..cc7a790ff4 100644 --- a/docs/dev/debugging.md +++ b/docs/dev/debugging.md @@ -57,6 +57,14 @@ To apply changes to an already running debug process, press Ctrl+Shift+P