Background
#624 adds split debug companions for stripped let-go bytecode. A related question is how debugging should work for lg -w WebAssembly builds, including whether we should emit a sister debug asset and whether an ECMA-426 WebAssembly source map could make browser tooling understand let-go sources.
The current WebAssembly path is:
let-go source -> LGB bytecode -> embedded data
|
Go/TinyGo interpreter -> WebAssembly
The existing debug information maps LGB instruction pointers back to .lg source locations. ECMA-426 WebAssembly maps instead map byte offsets in the generated Wasm binary back to original sources. Because multiple LGB instructions execute through the same interpreter code, the existing mapping cannot simply be converted into a useful .wasm.map.
Investigation
Expected outcome
Produce a short design note or proof of concept that separates:
- Runtime symbolication for interpreted let-go code using a digest-bound LGB debug companion.
- Browser DevTools symbolication for native WebAssembly frames using ECMA-426 and/or DWARF.
- Any compiler work required for direct let-go-to-Wasm mappings.
This investigation should not block #624. The likely near-term implementation is the sister LGB debug asset; standards-compatible Wasm source maps are a separate, larger compiler/tooling project.
Background
#624 adds split debug companions for stripped let-go bytecode. A related question is how debugging should work for
lg -wWebAssembly builds, including whether we should emit a sister debug asset and whether an ECMA-426 WebAssembly source map could make browser tooling understand let-go sources.The current WebAssembly path is:
The existing debug information maps LGB instruction pointers back to
.lgsource locations. ECMA-426 WebAssembly maps instead map byte offsets in the generated Wasm binary back to original sources. Because multiple LGB instructions execute through the same interpreter code, the existing mapping cannot simply be converted into a useful.wasm.map.Investigation
.lgb.debugasset forlg -w -strip..lgsources.Expected outcome
Produce a short design note or proof of concept that separates:
This investigation should not block #624. The likely near-term implementation is the sister LGB debug asset; standards-compatible Wasm source maps are a separate, larger compiler/tooling project.