Rust's dbg! macro (new in 1.32) is delightful. You write dbg!(my_var) and you get a print statement that writes:
[src/my_file.rs:123] my_var = "value of my_var"
It's a huge ergonomic help when debugging!
One interesting feature of Rust: it has both print and dbg, so you don't need to use print for debugging very often. I don't even use print that often.
TIL that Rust's dbg! macro also works in release builds, so you can debug issues when you need the perf of a release build.
This differs from debug_assert! which is ignored in release builds.
Print debugging remains an extremely common debugging technique. This makes me wonder: what's the state-of-the-art for print debugging?
Rust's debug! macro prints a bunch of helpful information (variable name, line number) but there must be other nice tools in this space.