mirror of
https://github.com/bevyengine/bevy
synced 2024-11-27 07:00:18 +00:00
3a20462d3f
This obsoletes #1111 and #2445, since @ColonisationCaptain and @temhotaokeaha haven't replied to #2373. I believe that both of those PRs would be fine to keep, but they're even more fine to keep now :)
1.2 KiB
1.2 KiB
Debugging
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 which adds syntax highlighting to the terminal output.
- Additionally get pager by piping to
less
( on Unix systems ):cargo expand --color always | less -R
- Additionally get pager by piping to
- Alternatively you could install and use cargo expand which adds syntax highlighting to the terminal output.
- 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.
To capture a wgpu trace:
- Create a new
wgpu_trace
folder in the root of your cargo workspace - Add the "wgpu_trace" feature to the bevy crate. (ex:
cargo run --example features wgpu_trace
) - Zip up the wgpu_trace folder and attach it to the relevant issue. New wgpu issues should generally be created in the wgpu repository. Please include the wgpu revision in your bug reports. You can find the revision in the
Cargo.lock
file in your workspace.