Skip to content

Expose some fields of Stepping #18100

@benfrankel

Description

@benfrankel

What problem does this solve or what need does it fill?

I'd like to build a simple system stepping tool, but the fields of Stepping are private so I can't update the tool's UI without manually tracking all changes to Stepping and replicating its internal data structures (and even then, I have to assume that Stepping is never mutated anywhere else).

Stepping only exposes the current cursor position via cursor(), the schedule order via schedules(), and whether it's enabled via is_enabled(). I can't check if a system is set to always run, or never run, or has a breakpoint, for example.

What solution would you like?

The simplest solution is to expose the fields of Stepping and ScheduleState as pub. Since Stepping is a debugging tool, I think it makes sense to expose its internals -- maybe with a note in the docs to avoid mutating the fields directly unless you know what you're doing.

What alternative(s) have you considered?

Add more getter methods like cursor() and schedules() until all the relevant info is accessible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-Dev-ToolsTools used to debug Bevy applications.C-UsabilityA targeted quality-of-life change that makes Bevy easier to useD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions