- To use print debugging, you have to use macros which output to the [Helix log file][log-file], as outputting to stdout/stderr won't work because *that's where Helix renders!*:
* Print using `log::info!`, `warn!`, or `error!`. (`log::info!("helix!")`). There is also `helix_stdx::dbg!` which is the same as the regular `dbg!` macro, but it outputs to the log file at the `ERROR` level.
* Pass the appropriate verbosity level option for the desired log level. (`hx -v <file>` for info, more `v`s for higher verbosity)
* Want to display the logs in a separate file instead of using the `:log-open` command in your compiled Helix editor? Start your debug version with `cargo run -- --log foo.log` and in a new terminal use `tail -f foo.log`
- Instead of running a release version of Helix, while developing you may want to run in debug mode with `cargo run` which is way faster to compile
- Looking for even faster compile times? Give a try to [mold](https://github.com/rui314/mold)
- If you don't use the Nix development shell and are getting your rust-analyzer binary from rustup, you may need to run `rustup component add rust-analyzer`.
This is because `rust-toolchain.toml` selects our MSRV for the development toolchain but doesn't download the matching rust-analyzer automatically.