Skip to content

Commit

Permalink
Add wgpu trace docs
Browse files Browse the repository at this point in the history
  • Loading branch information
cart committed Aug 16, 2020
1 parent 5fdf36d commit 9e1a1d1
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions docs/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@

## Macro Debugging

- Print the final output of a macro using `cargo rustc --profile=check -- -Zunstable-options --pretty=expanded`
- Alternatively you could install and use [cargo expand](https://github.com/dtolnay/cargo-expand) which adds syntax highlighting to the terminal output.
- Additionally get pager by piping to `less` ( on Unix systems ): `cargo expand --color always | less -R`
- Print output during macro compilation using `eprintln!("hi");`
* Print the final output of a macro using `cargo rustc --profile=check -- -Zunstable-options --pretty=expanded`
* Alternatively you could install and use [cargo expand](https://github.com/dtolnay/cargo-expand) which adds syntax highlighting to the terminal output.
* Additionally get pager by piping to `less` ( on Unix systems ): `cargo expand --color always | less -R`
* Print output during macro compilation using `eprintln!("hi");`

## WGPU Tracing

When a suspected wgpu error occurs, you should capture a wgpu trace so that Bevy and wgpu devs can debug using the [wgpu player tool](https://github.com/gfx-rs/wgpu/wiki/Debugging-wgpu-Applications#tracing-infrastructure).

To capture a wgpu trace:
1. create a new `wgpu_trace` folder in the root of your cargo workspace
2. add the "wgpu_trace" feature to the bevy crate. (ex: `cargo run --example features wgpu_trace`)
3. zip up the wgpu_trace folder and attach it to the relevant issue

0 comments on commit 9e1a1d1

Please sign in to comment.