rchiodo
(Rich Chiodo)
September 2, 2022, 5:48pm
1
Does anybody have any tips on debugging emscripten builds?
Right now it generates source-maps. I can’t get the chrome devtools to find the CPython source.
If this works for you, what sort of setup do you have?
DWARF seems to work for non-node scenarios, but was hoping to try and get node based debugging to work.
Thanks
tiran
(Christian Heimes)
September 2, 2022, 6:35pm
2
It works out of the box for me:
$ ./Tools/wasm/wasm_build.py emscripten-browser-debug
$ ./Tools/wasm/wasm_webserver.py
Then open http://localhost:8000/builddir/emscripten-browser-debug/python.html
in Chromium with C/C++ DevTools Support (DWARF). Done.
rchiodo
(Rich Chiodo)
September 2, 2022, 7:02pm
3
sorry I should have put ‘node’ in the title.
It works for browser builds, but not for node. I changed configure to generate source maps for node and (as node doesn’t seem to support DWARF) but the chrome devtools doesn’t seem to find anything.
tiran
(Christian Heimes)
September 3, 2022, 6:48am
4
Aah, you are trying to debug node builds with Chrome DevTools.
This might not work with -gseparate-dwarf
and might require -gsource-map
. You could try to play around with different settings for WASM_LINKFORSHARED_DEBUG
in configure
. EMSDK 3.1.17+ also support source map and DWARF at the same time, Allow DWARF with source map by aheejin · Pull Request #17484 · emscripten-core/emscripten · GitHub