rfcs
rfcs copied to clipboard
Color the `dbg!()` macro
I found this cool crate that offers a colored version of dbg!() called color!().
Unfortunately, it doesn't integrate with all other crates because most people aren't aware of this crate so they haven't added an integration for it. And orphan rule doesn't let me easily create a custom impl for those crates.
Would be really nice if we had colored dbg!()
output in the dbg!()
macro (or perhaps create another macro for colored debug output, or via println!()
, or something like that). It's especially helpful when dealing with complex nested structs by letting me find what I'm looking for more easily/conveniently.
This proposal received lots of positive feedback in the internals forum, so I'm copying it over to this RFC.