cargo expand is a subcommand that shows the output of macro expansion. It's invaluable for debugging derive macros, understanding what declarative macros produce, or learning how async functions desugar. I run cargo expand --lib to see the entire crate or cargo expand module::function for a specific item. The output is fully-expanded Rust code with all macros resolved. This helps when macro errors are cryptic or when you want to understand the generated code. It requires nightly Rust but is a must-have tool for macro development. Combined with rust-analyzer's inline expansion, it makes working with macros much less mysterious.