diff --git a/cli/src/main.rs b/cli/src/main.rs index c1dd2501..e0625708 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -329,6 +329,11 @@ fn run() -> Result<()> { let update = matches.is_present("update"); let filter = matches.value_of("filter"); + if debug { + // For augmenting debug logging in external scanners + env::set_var("TREE_SITTER_DEBUG", "1"); + } + loader.use_debug_build(debug_build); let languages = loader.languages_at_path(¤t_dir)?;