bevyengine/bevy
bevy_dev_tools
Developer-time utilities. The on-screen FPS overlay, state inspectors, picking debug overlays, frame-time graphs, and the framework for adding more.
Purpose
Things you want during development but not in shipping builds. The crate is gated behind the bevy_dev_tools cargo feature (and almost everything in it is feature-gated further). Standard practice is #[cfg(feature = "bevy_dev_tools")] around the plugin add.
Directory layout
crates/bevy_dev_tools/src/
├── lib.rs
├── fps_overlay/ # FpsOverlayPlugin (top-left FPS counter)
├── frame_time_graph/ # Frame-time graph overlay
├── states/ # StateInspectorPlugin
├── picking_debug/ # Visualizes picking events
├── ci_testing/ # Drive an app for fixed frames in CI
└── …Key abstractions
| Type | File | Description |
|---|---|---|
FpsOverlayPlugin, FpsOverlayConfig |
crates/bevy_dev_tools/src/fps_overlay/ |
Toggleable FPS counter. |
FrameTimeGraphPlugin |
crates/bevy_dev_tools/src/frame_time_graph/ |
Rolling frame-time histogram overlay. |
StateInspectorPlugin |
crates/bevy_dev_tools/src/states/ |
Logs state transitions. |
DebugPickingPlugin |
crates/bevy_dev_tools/src/picking_debug/ |
Draws ray hits and pointer events. |
| CI testing utilities | crates/bevy_dev_tools/src/ci_testing/ |
Run an app for N frames and exit. |
How it works
Each tool is its own Plugin. The FPS overlay reads from bevy_diagnostic::DiagnosticsStore and writes to a Text UI node. The state inspector observes StateTransitionEvent. The picking debugger draws gizmos from bevy_picking events.
Integration points
- Depends on:
bevy_app,bevy_diagnostic,bevy_text,bevy_ui,bevy_render,bevy_picking,bevy_state,bevy_color. - Depended on by: Examples and apps explicitly opting in.
Entry points for modification
- Add a new dev tool as its own subdirectory + plugin. Match the pattern: feature-gate, register a single plugin, expose configuration as a resource.
- The CI testing plugin is the right hook for automated screenshot tests.
See also
bevy_diagnostic— backing data for the FPS overlay.- Debugging.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.