Expand description
Having a sourcemap associated with your WASM file allows seeing the exact filename, the line number and character position right in the browser or supporting debugger. This can speed up tracing errors back to their source, make sense of panic unwinds right in the browser and even simple console messages are immediately identifiable without external post processing.
It also offers an opportunity to debug the WASM binary, set breakpoints and overall support the same developer experience JavaScript has in modern browsers for ages.
Inspirations:
- wasm_sourcemap.py by the Emscripten Team
- WebAssembly Debugging by Will Scott and Oasis Labs
Structs
- Represents a code unit which can be translated to a sourcemap code point
- The actual DWARF to Sourcemap mapper