proc-debug crate


Belief configuration
- Cargo.toml
#[dependencies]
= "0.1"
- lib.rs
- show help (--no-capture is important)
- show all dumps (called from
<test-name>)
- filtered

#[dependencies]
proc-debug = "0.1"
#[proc_macro]
#[proc_debug::proc_debug]
fn my_macro(attr: TokenStream, input: TokenStream) -> TokenStream { .. }
$ PROC_DEBUG_FLAGS="--help" cargo build --test <test-name> -- --nocapture
Usage: proc-debug [-a] [-n <not...>] [-p <path...>] [-d <depth>] [-c <count>]
[-v] [queries...]
Input for `proc-debug`
Options:
-a, --all debug all macros
-n, --not <not> hide outputs match
-p, --path <path> full or partial path of macro definition
-d, --depth <depth> depth to show in macro output
-c, --count <count> count to show in display
-v, --verbose verbose
-h, --help Show this help message and exit.
<test-name>)$ PROC_DEBUG_FLAGS="-a" cargo build --test <test-name> -- --nocapture
$ PROC_DEBUG_FLAGS="your_macro_path" cargo build --test <test-name> -- --nocapture