src/doc/rustc-dev-guide/src/hir/debugging.md MARKDOWN 16 lines View on github.com → Search inside
1# HIR Debugging23Use the `-Z unpretty=hir` flag to produce a human-readable representation of the HIR.4For cargo projects this can be done with `cargo rustc -- -Z unpretty=hir`.5This output is useful when you need to see at a glance how your code was desugared and transformed6during AST lowering.78For a full `Debug` dump of the data in the HIR, use the `-Z unpretty=hir-tree` flag.9This may be useful when you need to see the full structure of the HIR from the perspective of the10compiler.1112If you are trying to correlate `NodeId`s or `DefId`s with source code, the13`-Z unpretty=expanded,identified` flag may be useful.1415TODO: anything else? [#1159](https://github.com/rust-lang/rustc-dev-guide/issues/1159)

Findings

✓ No findings reported for this file.

Get this view in your editor

Same data, no extra tab — call code_get_file + code_get_findings over MCP from Claude/Cursor/Copilot.