Color the `dbg!()` macro
Nobody has claimed this yet.
- Dominant language
- Markdown
- Stars
- 6.6k
- Forks
- 1.7k
- Avg merge
- 16h 14m
- Merged PRs (30d)
- 1
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the linked internals forum discussion and the references for Rust's dbg! macro and dbg-pls's color! macro. Compare the proposed options, including changing dbg!, adding another macro, or using println!, and identify the constraints around crate integration and the orphan rule. Done means a settled RFC design with clear scope and an agreed output approach.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100