
Bevy Debugging Profiling
Bevy ECS skill for logs and diagnostics.
Install
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill bevy-debugging-profiling -g -a claude-code -y- Repository
- thedivergentai/Game-Dev-Agentic-Skills917
- Category
- Engineering
- Updated
- 19d ago
- License
- LGPL-3.0
- Context cost
- Mediumabout 1,972 tokens
- Runs scripts
- No, instructions only
What it does
Bevy ECS skill for logs and diagnostics. Keywords: Bevy, LogPlugin, DiagnosticsPlugin, FrameTimeDiagnosticsPlugin.
Bevy debugging and profiling
When to use
Load this when a running app should print logs or record frame time, entity count, or process CPU and memory.
ECS shape
- Logs:
LogPluginis part ofDefaultPlugins. Override it withDefaultPlugins.set(LogPlugin { level, filter, .. }). The page's example usesLevel::DEBUGand a filter string such aswgpu=error,bevy_render=info,bevy_ecs=trace. The same filter works asRUST_LOG. To bring your own collector, disable this plugin onDefaultPlugins. - Diagnostics core:
DiagnosticsPluginadds the core resources.DiagnosticsStoreholds the collection.Diagnosticis a timeline ofDiagnosticMeasurementvalues addressed byDiagnosticPath.RegisterDiagnosticaddsregister_diagnosticonApp. - Built-in plugins:
FrameTimeDiagnosticsPluginadds frame time, fps, and frame count.EntityCountDiagnosticsPluginadds an entity count.SystemInformationDiagnosticsPluginaddscpu_usageandmem_usagepercent.LogDiagnosticsPluginprints diagnostics to the console.FrameCount/FrameCountPlugincount frames since start. - Order: the log-diagnostics example adds these plugins after
DefaultPluginsbecause they use the time plugin for timestamps. - Schedule: built-in plugins measure on their own. Read
DiagnosticsStorewhen a HUD needs the latest sample. Register aDiagnosticonly for a value you measure yourself.
Examples
[dependencies]
bevy = "0.20"
LogPlugin ships inside DefaultPlugins. Replace its level and filter when the default info stream is too quiet or too loud.
use bevy::log::{Level, LogPlugin};
fn main() {
App::new()
.add_plugins(DefaultPlugins.set(LogPlugin {
filter: "wgpu=error,bevy_render=info,bevy_ecs=trace".into(),
level: Level::DEBUG,
..default()
}))
.run();
}
