744 B
744 B
Debugging
VS Code
- Open this folder in VS Code.
- Run
Debug Heros Web (Chrome)from Run and Debug. - VS Code starts the Vite dev server and opens Chrome at
http://localhost:5173. - Set breakpoints in
src/game/scenes/*.ts.
Browser Console
Development builds expose:
window.__HEROS_GAME__
window.__HEROS_DEBUG__
Useful commands:
__HEROS_DEBUG__.activeScenes()
__HEROS_DEBUG__.battle()
__HEROS_DEBUG__.goToBattle()
__HEROS_DEBUG__.toggleBattleOverlay()
Battle Hotkeys
F9: Toggle battle debug overlay.F10: Log battle state to the browser console.
The battle debug state includes turn, phase, selected unit, pending move, acted units, unit coordinates, attack intents, and bond progress.