Skip to content

Commit f78cf98

Browse files
committed
Update "Debugging" section in "README.md" file
1 parent 61541fd commit f78cf98

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,28 @@ cargo +1.76.0 test <OPTIONS>
223223

224224
For each `expand()`-like method call within your tests a temporary and uniquely named Rust project will get generated within `$CARGO_TARGET_DIR/target/tests/`.
225225
By default these projects will get deleted upon test completion (regardless of the outcome).
226-
If you wish to take a look at the actual code/projects being expanded you can provide `TRYEXPAND_KEEP_ARTIFACTS=1` (e.g. `$ TRYEXPAND_KEEP_ARTIFACTS=1 cargo test`) and `tryexpand` will skip the cleanup.
226+
If you wish to take a look at the actual code/projects being expanded you can provide `TRYEXPAND_KEEP_ARTIFACTS=1` and `tryexpand` will skip the cleanup:
227+
228+
```terminal
229+
TRYEXPAND_KEEP_ARTIFACTS=1 cargo test
230+
```
227231

228232
#### `TRYEXPAND_TRUNCATE_OUTPUT`
229233

230234
By default `tryexpand` truncates console output that's longer than 100 lines.
231-
If you wish to temporarily turn this behavior you can provide `TRYEXPAND_TRUNCATE_OUTPUT=0` (e.g. `$ TRYEXPAND_TRUNCATE_OUTPUT=0 cargo test`) and `tryexpand` will produce the full console output.
235+
If you wish to temporarily turn this behavior you can provide `TRYEXPAND_TRUNCATE_OUTPUT=0` and `tryexpand` will produce the full console output:
236+
237+
```terminal
238+
TRYEXPAND_TRUNCATE_OUTPUT=0 cargo test
239+
```
240+
241+
#### `TRYEXPAND_DEBUG_LOG`
242+
243+
If you wish to see the exact commands that `tryexpand` is executing you can provide `TRYEXPAND_DEBUG_LOG=1` (together with `--nocapture`, if you also wish to see logs of passing tests) and `tryexpand` will print additional debug logs:
244+
245+
```terminal
246+
TRYEXPAND_DEBUG_LOG=0 cargo test -- --nocapture
247+
```
232248

233249
## Contributing
234250

0 commit comments

Comments
 (0)