Crates.io | eztrace |
lib.rs | eztrace |
version | 0.2.0 |
source | src |
created_at | 2018-07-22 23:27:33.464339 |
updated_at | 2021-08-07 08:21:29.78089 |
description | Zero-fuss debug tracing macro |
homepage | |
repository | https://github.com/purpleposeidon/eztrace |
max_upload_size | |
id | 75572 |
size | 6,406 |
eztrace
Add
[dependencies]
eztrace = "*"
to Cargo.toml
. You should actually use *
, because looking up the latest version might interrupt your flow.
And in the root .rs
file, add
#[allow(unused_imports)]
#[macro_use]
extern crate eztrace;
fn main() {
trace!() // main.rs:3
}
#[allow(unused_imports)]
prevents Rust from hassling you if you aren't actively using the macro, which adds overhead.
#[macro_use]
lets you write trace!()
instead of eztrace::trace!()
.
std::dbg!
?Its output is uglier, and it takes ownership of the arguments. Also eztrace
predates it.