Playground: Developer troubleshooting documentation for WASM deployments #240

Open
opened 2026-02-02 20:51:26 +00:00 by john · 0 comments
Owner

Overview

Create comprehensive documentation to help game developers troubleshoot issues when deploying McRogueFace games via Emscripten/WASM.

Scope

Create docs/emscripten-debugging.md

Quick Diagnostics Section

Browser console commands for checking interpreter state:

window.getPythonState();      // Check for error state
window.clearPythonError();    // Clear error state
window.dumpPythonGlobals();   // Dump Python namespace
window.dumpLoadedModules();   // List loaded modules

Common Issues Section

  • "Loss of all output" - PyErr state stuck
  • "Infinite loop" / Tab freezes - No timeout protection
  • Build crashes with cryptic errors - Debug build instructions
  • Asset loading failures - Virtual filesystem paths
  • Audio not working - Stubbed in WASM builds

Debug Build Instructions

emmake cmake -B build-debug \
    -DMCRF_SDL2=ON \
    -DCMAKE_BUILD_TYPE=Debug

Chrome DevTools Setup

  • DWARF extension installation
  • Source panel navigation
  • Breakpoint usage in C++ code

Update CLAUDE.md

Add reference to troubleshooting guide in Emscripten section.

References

Part of playground improvement initiative documented in docs/PLAYGROUND_IMPROVEMENT_PLAN.md (Phase 6)

## Overview Create comprehensive documentation to help game developers troubleshoot issues when deploying McRogueFace games via Emscripten/WASM. ## Scope ### Create `docs/emscripten-debugging.md` #### Quick Diagnostics Section Browser console commands for checking interpreter state: ```javascript window.getPythonState(); // Check for error state window.clearPythonError(); // Clear error state window.dumpPythonGlobals(); // Dump Python namespace window.dumpLoadedModules(); // List loaded modules ``` #### Common Issues Section - "Loss of all output" - PyErr state stuck - "Infinite loop" / Tab freezes - No timeout protection - Build crashes with cryptic errors - Debug build instructions - Asset loading failures - Virtual filesystem paths - Audio not working - Stubbed in WASM builds #### Debug Build Instructions ```bash emmake cmake -B build-debug \ -DMCRF_SDL2=ON \ -DCMAKE_BUILD_TYPE=Debug ``` #### Chrome DevTools Setup - DWARF extension installation - Source panel navigation - Breakpoint usage in C++ code ### Update CLAUDE.md Add reference to troubleshooting guide in Emscripten section. ## References - [PEP 776 - Emscripten Support](https://peps.python.org/pep-0776/) - [Pyodide Debugging Tips](https://pyodide.org/en/stable/development/debugging.html) - [Pyodide WASM Constraints](https://pyodide.org/en/stable/usage/wasm-constraints.html) ## Related Part of playground improvement initiative documented in `docs/PLAYGROUND_IMPROVEMENT_PLAN.md` (Phase 6)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
john/McRogueFace#240
No description provided.