dbg

dbg!(expr, ..) macro from RFC 2173 in stable Rust


Keywords
macro, debug
Licenses
MIT/Apache-2.0

Documentation

RFC 2173: The dbg!(expr, ..) macro

This crate provides a working implementation of RFC 2173 on stable Rust.

To use the crate, add this to Cargo.toml:

[dependencies]
dbg = "1.0.4"

and to lib.rs or main.rs (the crate root):

#[macro_use] extern crate dbg;

Now you are ready to use the macro. Happy debugging!

If you are on nightly, the macro will automatically be built with the specialization features mandated by the RFC.

For more details and documentation, please see the guide-level explanation.