I’m not sure the best way to track that sort of thing. Personally I use the logging statements that are inside it, e.g. RUST_LOG=rustc::middle::traits rustc ... will cause debug! and info! statements inside that module to print during that invocation. I believe getting debug! statements to print requires compiling a compiler manually, passing --enable-debug-assertions to ./configure. (The compiler’s RUST_LOG is similar to that in the external env_logger crate, but possibly not 100% identical.)
gdb will also work better if you build the compiler yourself and pass --enable-debuginfo to ./configure. I believe one can pass both --enable-debug-assertions and --enable-debuginfo with the --enable-debug flag, but you’ll probably want to also pass --enable-optimize to avoid getting a horribly slow compiler. Also, there’s been some unreliabilities with using a debugger on the compiler (and/or with building a compiler for a debugger) in the past, which may still exist.
(./configure accepts --help, so you don’t have to remember all the details about the various flags.)