Skip to content

Expose ECS system stepping over the Bevy Remote Protocol - #25826

Merged
alice-i-cecile merged 2 commits into
bevyengine:mainfrom
jbuehler23:jackdaw/brp-stepping
Sep 20, 2026
Merged

alice-i-cecile merged 2 commits into
bevyengine:mainfrom
jbuehler23:jackdaw/brp-stepping

Conversation

@jbuehler23

Copy link
Copy Markdown
Contributor

Objective

Part of #23013.

The system stepper can only be driven from inside the app. Remote tooling has no way to pause a running game and step it.

This pauses the ECS simulation, not the clock. Render and remote schedules keep running so the world stays inspectable.

Solution

Five instant methods on the main world, all returning the same status object

  • stepping.status reports whether stepping is on, the added schedules, and the cursor position
  • stepping.enable and stepping.disable
  • stepping.step_frame and stepping.continue_frame

The cursor is resolved to a schedule label and system name. Labels use the same format as schedule.list.

Gated behind a bevy_debug_stepping feature on bevy_remote, folded into the engine feature of the same name. Status on a world with no stepper returns a disabled response. The mutating methods return an error.

Breakpoints and always run and never run controls are left for a follow up.

AI disclosure

AI assistance was used to help port these changes and to plan this upstream series from our existing Jackdaw functionality. All changes were reviewed by a human before submission.

@jbuehler23 jbuehler23 added C-Feature A new feature, making something new possible A-Dev-Tools Tools used to debug Bevy applications. D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Sep 17, 2026
@Zeophlite

Copy link
Copy Markdown
Contributor

Once #25239 is merged, it would be good to support it as well (not blocking, just for reference)

pub const BRP_SCHEDULE_GRAPH: &str = "schedule.graph";

/// The method path for a `stepping.status` request.
#[cfg(feature = "bevy_debug_stepping")]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's worth splitting this out to a different file and gating that file. To be honest this file is too big anyways

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

@alice-i-cecile alice-i-cecile left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plenty of glue, but this is extremely valuable to expose to debugging tools over BRP. LGTM, although I intend to merge the system set stepping work first and will want this to be rebased on top of it.

@jbuehler23

Copy link
Copy Markdown
Contributor Author

Plenty of glue, but this is extremely valuable to expose to debugging tools over BRP. LGTM, although I intend to merge the system set stepping work first and will want this to be rebased on top of it.

Yea agreed, and fine with me - this will form a lot of our debugging and visual tooling around systems in general

@alice-i-cecile alice-i-cecile added S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Sep 17, 2026
@alice-i-cecile alice-i-cecile added S-Needs-Review Needs reviewer attention (from anyone!) to move forward and removed S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged labels Sep 18, 2026
@alice-i-cecile alice-i-cecile added this to the 0.21 milestone Sep 18, 2026
@Zeophlite Zeophlite added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Sep 18, 2026
@alice-i-cecile

Copy link
Copy Markdown
Member

Ping me when CI is green to get this in <3

@jbuehler23

Copy link
Copy Markdown
Contributor Author

Ping me when CI is green to get this in <3

seems to be failing due to a syn upgrade? might have to just rebase

@jbuehler23

Copy link
Copy Markdown
Contributor Author

all green @alice-i-cecile :)

@alice-i-cecile
alice-i-cecile added this pull request to the merge queue Sep 20, 2026
Merged via the queue into bevyengine:main with commit 963cd35 Sep 20, 2026
62 of 68 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Dev-Tools Tools used to debug Bevy applications. C-Feature A new feature, making something new possible D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants