Open tiran opened 2 years ago
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/"
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.
--with-pydebug
PY_LDFLAGS_NODIST
var with-gsource-map --source-map-base http://localhost:8000/builddir/host/
emmake make -j8 python.html
python3 -m http.server
from thecpython
base directory (not the directory wherepython.html
lives).