diff --git a/docs/debugging.md b/docs/debugging.md index aafd3c2e35..a704a9d415 100644 --- a/docs/debugging.md +++ b/docs/debugging.md @@ -2,5 +2,7 @@ ## Macro Debugging -* Print the final output of a macro using ```cargo rustc --profile=check -- -Zunstable-options --pretty=expanded``` -* Print output during macro compilation using ```eprintln!("hi");``` \ No newline at end of file +- Print the final output of a macro using `cargo rustc --profile=check -- -Zunstable-options --pretty=expanded` + - Alternatively you could install and use [cargo expand](https://github.com/dtolnay/cargo-expand) which adds syntax highlighting to the terminal output. + - Additionally get pager by piping to `less` ( on Unix systems ): `cargo expand --color always | less -R` +- Print output during macro compilation using `eprintln!("hi");`