I recommend using cargo expand for the general case, and for the case of a proc-macro of your own, print can be very useful but, alas, doesn't yield such a nice looking output on its own (not formatted nor colored).
In that case, you can write your own helper pretty_print_tokenstream to palliate that, and it will yield cargo expand-looking code: