logoalt Hacker News

artemonstertoday at 2:47 PM3 repliesview on HN

for me its undebuggability.

-"hey, look at our C Rust FORTRAN to WASM translator, blahblah"

-"uhm, cool, how do I debug it?"

-"yeah...about that...you cant!"


Replies

phickeytoday at 5:22 PM

Wasmtime implements a remote debugging server, so that you can debug guest programs with a recent build of LLDB. Set breakpoints based on the source language symbols, single-step through wasm opcodes, anything you'd expect: https://docs.wasmtime.dev/examples-debugging-guest.html

tdhz77today at 3:06 PM

Why can’t you?

fslothtoday at 3:05 PM

This! The only way to get to a stable system at least with c/c++ source, where you can hunt bugs, is to have a fairly large unit test coverage. When something fails - add that as test case; run ctest - pray that this is discoverable with tests.

So wasm is a really strange compilation target for systems programming languages.

I mean there _are_ ways to debug it in a browser but they sort of suck.