Substrate uses a lot of macros to make it easier to write runtime modules:
construct_runtime!
decl_module!
decl_storage!
decl_event!
However, it is hard to understand what these macros actually do and what the final code looks like. How can I dig deeper into these macros and expansions?
To me, the most comfortable solution is to use cargo expand
https://github.com/dtolnay/cargo-expand
cargo install cargo-expand
then just call it from your crate
cargo expand