bytecodealliance / jco

JavaScript toolchain for working with WebAssembly Components
https://bytecodealliance.github.io/jco/
Apache License 2.0
640 stars 63 forks source link

[Feature Request] Add debug mode #483

Closed peter-jerry-ye closed 3 months ago

peter-jerry-ye commented 3 months ago

For operations such as transpile, it would be great if there's a debug mode that keeps all the symbols from the core Wasm, so that when we benchmark the core Wasm, we can still see function names.

guybedford commented 3 months ago

Binaries built with debug information should retain that debug information when processed through jco transpile.

If you have a case where debug information is being lost during the Jco transpilation process itself, that would be a bug - do share replication info so we can look into this further.

peter-jerry-ye commented 3 months ago

I tried with node --inspect-brk and I do observe all the symbols.

I think it might be an issue related to 0x I used where there's no symbols with the jco transpiled core wasm.