#can you see source files for zig built wasm executables in chrome?
1 messages · Page 1 of 1 (latest)
there are two kinds of debug info for wasm: dwarf and source maps. LLVM (which zig uses for wasm targets currently) supports dwarf, but not source maps
I'm not sure whether chrome supports dwarf though
looks like it does, but it might need to be manually enabled: https://developer.chrome.com/blog/wasm-debugging-2020
Step-by-step overview of the new debugging experience for WebAssembly in Chrome DevTools.
yeah I saw that, doesn't need to be enabled anymore I believe
I'll try to reproduce it working
I did this example https://ziglang.org/documentation/0.13.0/#toc-WebAssembly
but in the browser by swapping the fs module usage for a fetch, and I don't see any source files or debug info in the wasm (after converting to wat, although admittedly idk what debug info in wat looks like, I'm trying to find examples right now)
I'll turn on verbose compilation
ok it turns out in addition to the enabling of an experiment that no longer needs to be enabled, I needed the extension that I skimmed over, mentioned in the intro to that article you posted. Thank you!
this one: https://chromewebstore.google.com/detail/cc++-devtools-support-dwa/pdcpmagijalfljmkmjngeonclgbbannb
this is so much better! thanks for pointing me in the right direction!