aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/README.md b/README.md
index 4e949e4..7368162 100644
--- a/README.md
+++ b/README.md
@@ -175,3 +175,16 @@ struct SubCommandTwo {
```
NOTE: This is not an officially supported Google product.
+
+
+## How to debug the expanded derive macro for `argh`
+
+The `argh::FromArgs` derive macro can be debugged with the [cargo-expand](https://crates.io/crates/cargo-expand) crate.
+
+### Expand the derive macro in `examples/simple_example.rs`
+
+See [argh/examples/simple_example.rs](./argh/examples/simple_example.rs) for the example struct we wish to expand.
+
+First, install `cargo-expand` by running `cargo install cargo-expand`. Note this requires the nightly build of Rust.
+
+Once installed, run `cargo expand` with in the `argh` package and you can see the expanded code.