Ways of debugging WebAssembly code running within Node.js?

9 views
Skip to first unread message

John Dallman

unread,
Jul 15, 2026, 12:36:18 PM (8 days ago) Jul 15
to emscripte...@googlegroups.com
One of my team has used GDB on Node.JS to deal with SIGALRMs we were setting for timeouts. That's OK.

But we'd like a way of debugging our WebAssembly code running within Node,js; we can handle most things with printf debugging, but we have a possible optimiser bug in Emscripten, and those are much easier to dig out with a debugger.

I'm partially sighted, and find IDEs very difficult to use, so the ability to use GDB or LLDB on WebAssembly code would be very helpful 

We don't want to do this in a browser because we have a large and complex test harness, written in C, incorporating a LISP interpreter which we use for writing test scripts. The harness accesses test data files very freely. Getting all that working in a browser and a bundled file-system would be a huge task, and is definitely a last resort.  

Thanks,

John Dallman

Sam Clegg

unread,
Jul 15, 2026, 6:31:24 PM (7 days ago) Jul 15
to emscripte...@googlegroups.com
Hi John,

I also prefer node for testing and I would love to get better debugging support.  However, as far as I know neither DRAWF nor source maps work for Wasm + node today.

I imagine that getting source map support working would be not be too much work, but getting full DRAWF support work would be fairly involved.

I opened a bug in node for enabled source map support for Wasm modules: https://github.com/nodejs/node/issues/46873.  I think that might be good starting point.

Sadly I think the debugging option under node are fairly limited, even for JS, and most folks tend to recommend attaching chrome dev tools as the way to go, which I assume would not work for you?   So I fear ther isn't really a even good starting point, since even debuggin JavaScript using only the node CLI is not great today (unless I'm missing something)

cheers,
sam

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/emscripten-discuss/CAH1xqgkeGcovnqTCwxZemm%3DyqDct5F1%3DYDROCy0Q8ggVLUr90Q%40mail.gmail.com.

John Dallman

unread,
Jul 16, 2026, 10:03:55 AM (7 days ago) Jul 16
to emscripte...@googlegroups.com
OK, I'll direct people with normal vision to some claimed solutions for debugging in Node with Visual Studio Code. 

Thanks,   

John Dallman

Reply all
Reply to author
Forward
0 new messages