Debugging node emscripten builds?

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

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.

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.

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