Skip to content

Files

Latest commit

 

History

History
8 lines (6 loc) · 475 Bytes

debugging.md

File metadata and controls

8 lines (6 loc) · 475 Bytes

Debugging

Macro Debugging

  • Print the final output of a macro using cargo rustc --profile=check -- -Zunstable-options --pretty=expanded
    • Alternatively you could install and use 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");