From 9e1a1d15ea38839ea6fa5aad41c89cf0dcc0eae5 Mon Sep 17 00:00:00 2001 From: Carter Anderson Date: Sun, 16 Aug 2020 01:21:37 -0700 Subject: [PATCH] Add wgpu trace docs --- docs/debugging.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/docs/debugging.md b/docs/debugging.md index a704a9d415..f108ae3361 100644 --- a/docs/debugging.md +++ b/docs/debugging.md @@ -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