Skip to main content

dbg

Macro dbg 

Source
macro_rules! dbg {
    ($val:expr $(,)?) => { ... };
    ($($val:expr),+ $(,)?) => { ... };
}
Expand description

Prints and returns the value of a given expression for quick and dirty debugging.

ยงExamples

// prints `complex_operation() = ...` and assigns the result to `x`
let x = dbg!(complex_operation());