diff --git a/cli/src/main.rs b/cli/src/main.rs index 6d99ad85..8d701852 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -282,6 +282,11 @@ fn run() -> Result<()> { .map_or(Vec::new(), |e| e.collect()); let cancellation_flag = util::cancel_on_stdin(); + if debug { + // For augmenting debug logging in external scanners + env::set_var("TREE_SITTER_DEBUG", "1"); + } + let timeout = matches .value_of("timeout") .map_or(0, |t| u64::from_str_radix(t, 10).unwrap());