Hacker News new | past | comments | ask | show | jobs | submit login

Same way you would C code. Tell the compiler you want to compile for debugging, and then connect your debugger to the running program. Marks in the code will tell your debugger what things are called and which line in the source code you are on.

JS today is often transpiled anyway, so you have to use some mapping to the source code to do debugging (eg. source maps).




Thanks

I figured the built in browser debuggers wouldn't work so well for this.


The debuggers would need to be modified to support it, but I don't think there's a reason that you couldn't debug wasm inside a browser, if they were built to understand the debug annotations in the wasm code.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: