Debugging WebAssembly outside of the browser
hacks.mozilla.org
Debugging WebAssembly outside of the browser
1–10 of 66 posts
Re: Debugging WebAssembly outside of the browser
#2Re: Debugging WebAssembly outside of the browser
#3[1] http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.108...
Re: Debugging WebAssembly outside of the browser
#4Re: Debugging WebAssembly outside of the browser
#5Re: Debugging WebAssembly outside of the browser
#6Looks interesting, but why would I need to debug wasm binaries when I could debug directly the rust code? And why would I want to convert it to wasm? In order to run it in the browser, right?
Re: Debugging WebAssembly outside of the browser
#7Looks interesting, but why would I need to debug wasm binaries when I could debug directly the rust code? And why would I want to convert it to wasm? In order to run it in the browser, right?
In typical applications, the vast majority of bugs should happen in the platform-agnostic parts, so debugging a native build totally makes sense. It would still be great if WASM would be as trivially debuggable as native code.
IMHO proper source-level debugging support in the browser dev-tools (or remote-debugging via VSCode) would make a lot more sense than debugging in gdb/lldb though.
Re: Debugging WebAssembly outside of the browser
#8Looks interesting, but why would I need to debug wasm binaries when I could debug directly the rust code? And why would I want to convert it to wasm? In order to run it in the browser, right?
As for your second question... there's motion towards making wasm runtimes other environments, like devices or server-side. Kind of like the JVM or CLR, but closer to the metal (e.g. no garbage collector). The advantage of the server-side is the same as node.js, sharing code with the client. The advantage for other environments is a portable file format with performance characteristics closer to native. My impression is that the reception is less enthusiastic than wasm in the browser.
Re: Debugging WebAssembly outside of the browser
#9Looks like we're well on our way to a somewhat overly complicated reimplementation of thin binaries[1] [1] http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.108...
Re: Debugging WebAssembly outside of the browser
#10Looks interesting, but why would I need to debug wasm binaries when I could debug directly the rust code? And why would I want to convert it to wasm? In order to run it in the browser, right?
I don't see how you would "debug directly the rust code" without debugging the wasm binaries. Wasm is a compilation target for rust. To be clear: You compile rust directly to wasm, it's not like you compile your rust to a binary and then convert that to wasm. I do not believe there is an intermediate artifact. As for your second question... there's motion towards making wasm runtimes other environments, like devices…
I think the intention of OP is that you compile the same Rust code to a native x86 or ARM binary and debug that. Most bugs are ISA-agnostic so that approach totally makes sense in many situations.
That's how I'm debugging my WASM code compiled from C/C++, and that also works automatically with IDE debuggers that don't know about WASM (like Xcode's or Visual Studio's).