Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow inspecting World for debugging entity issues and other #3860

Open
djeedai opened this issue Feb 3, 2022 · 1 comment
Open

Allow inspecting World for debugging entity issues and other #3860

djeedai opened this issue Feb 3, 2022 · 1 comment
Labels
A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use

Comments

@djeedai
Copy link
Contributor

djeedai commented Feb 3, 2022

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

Trying to find why an Entity is not found in the render World by dumping that world with a trace!() just before panic.

What solution would you like?

Allow iterating somehow on entities, components, and archetypes, to allow debugging. Or at least allow dumping the archetypes. Currently only Entities and Components implement Debug, not Archetypes. And entities have no ID, only an EntityLocation that seem to refer to the archetype. So one cannot locate an entity by ID into a world.

What alternative(s) have you considered?

I don't see any. trace!() is already a last-resort technique which dumps in a rather indigestible format; I would have preferred allowing direct read-only iteration (though can understand if that's forbidden for ECS safety reasons).

Additional context

Trying to debug thread 'main' panicked at 'called Result::unwrap()on anErr value: NoSuchEntity',. I know the entity ID, but cannot see if it's in the world, or what other entities are there that would guide my debugging.

@djeedai djeedai added C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled labels Feb 3, 2022
@alice-i-cecile alice-i-cecile added A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use and removed C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled labels Feb 4, 2022
@alice-i-cecile
Copy link
Member

Related to #1467 and #1130.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use
Projects
None yet
Development

No branches or pull requests

2 participants