I often find myself writing like the following when debugging:
let interesting_variable = 123;
dbg!(&interesting_variable);
panic!();
I add the panic macro to improve signal/noise ratio since there's a whole lotta other logs spamming the CLI output, and panic allows me to focus the CLI output on specifically the interesting_variable that I'm trying to inspect.
Would be nice if support for Debug trait is added to panic!() macro so I can write like this instead:
let interesting_variable = 123;
panic!(interesting_variable);
Just write your own macro if you need this often, it takes a couple of lines of code and as a bonus you can make the debug message meaningful and won’t be abusing panic! for something that is not a panic.