println!() in debug, noop in release.
Use the crates.io repository; add this to your Cargo.toml along with the rest of your dependencies:
Cargo.toml
toml [dependencies] debugln = "*"
Zach Pomerantz is the primary author and maintainer of debug.
MIT