You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's tricky to debug emscripten builds. By default emcc strips all debug symbols and even function names from WASM files. I got some promising results with debug builds, source map, and Chromium DevTools.
Configure with --with-pydebug
Extend PY_LDFLAGS_NODIST var with -gsource-map --source-map-base http://localhost:8000/builddir/host/
emmake make -j8 python.html
Run python3 -m http.server from the cpython base directory (not the directory where python.html lives).
Activity
tiran commentedon Jan 5, 2022
Source map does not require a debug build. A standard build of Python includes sufficient DWARF symbols to generate a source map:
$ emmake make python.html BUILDPYTHON= LDFLAGS="-gsource-map --source-map-base=http://localhost:8000/builddir/host/"