davidyu / Sonar

Networked multiplayer SHMUP-lite
http://lewenyu.com/sonar
MIT License
0 stars 0 forks source link

Allow debugger to examine all components attached to an entity #1

Closed davidyu closed 10 years ago

davidyu commented 10 years ago

Right now, if we crash some place, we can't look at all components attached to an Entity. This makes debugging really cumbersome.

Maybe write a DebugDumpComponents method that grabs all components attached to an Entity, return it as an iterable array (which the debugger can traverse), and call it right before throwing an exception.

Or, and this is really hacky, but maybe in the debug version, make a field in Entity that points to this array/list of components.

davidyu commented 10 years ago

Looks like listComponents() is already in there. Good job!

Artemis commit 60e3f388be4c68ef9ff697af4fd6fc53b9b1aed7 addresses this.