debug_macros

Crates.iodebug_macros
lib.rsdebug_macros
version0.0.1
sourcesrc
created_at2015-12-26 20:39:04.217393
updated_at2015-12-26 20:39:04.217393
descriptionA simple set of macros to help debugging.
homepage
repositoryhttps://github.com/billiob/debug_macros.rs/
max_upload_size
id3761
size2,864
Boris Faure (borisfaure)

documentation

README

debug_macros

A simple set of macros (only one so far) to help debugging.

Currently it contains:

  • dbg!() is a macro to print line only when a crate is compiled in debug mode. In release mode, dbg!() is a noop. It prints the crate, the file and and the line where dbg!() is called.

Installation

This crate is fully compatible with Cargo. Just add it to your Cargo.toml:

[dependencies]
debug_macros = "*"

Quick example

#[macro_use]
extern crate debug_macros;

fn main() {
    dbg!("2+2={}", 2+2);
}
Commit count: 8

cargo fmt