I'm having a really hard time with errors in WASM....
# webassembly
f
I'm having a really hard time with errors in WASM... Any failure is just a blanket
[object WebAssembly.Exception]
with no pointer to what went wrong. How do you guys debug errors?
i
To debug wasm you could try to use debugger. It is not very handy but still can point you into the place and reason what happened.
f
@Igor Yakovlev no debugger for windows yet
Or maybe you mean the browser debugger - I'm not sure if it's better than using prints
Really, the issue is not that I don't know where it crashed, it is just that I call some JS method and it blows up with no feedback
I've actually figured out a sort of hack where you wrap the JS code in your own JS code that try/catches the part that errors and prints the real error
w
Are you using the
-Xwasm-use-new-exception-proposal
compiler flag?
f
@Winson Chiu I've tried both with and without and it sometimes helps and sometimes makes things worse
😫 1