dbg

Debug print args followed by a newline.

Similar to Rust's dbg macro introduced in version 1.32.

@safe pure @safe pure nothrow @nogc
void
dbg
(
string file = __FILE__
uint line = __LINE__
string fun = __FUNCTION__
Args...
)
(
Args args
)

Examples

// int x = 42;
// dbg("x: ", x);
static assert(__traits(compiles, { dbg(); })); // ok for dln to discard function qualifiers

See Also

Meta