feat: add StateManager.dump() and expose window.__sm for debugging
- StateManager.dump(): console.table formatted dump of variables, flags, history - window.__sm: exposes engine.stateManager in dev mode for console inspection
This commit is contained in:
@@ -91,4 +91,12 @@ export class StateManager {
|
||||
this.flags = new Set(data.flags)
|
||||
this.history = [...data.history]
|
||||
}
|
||||
|
||||
dump() {
|
||||
console.group('StateManager')
|
||||
console.table(this.variables)
|
||||
console.log('flags:', [...this.flags])
|
||||
console.table(this.history)
|
||||
console.groupEnd()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user