gofractally / psibase

Open source protocol enabling communities to easily self-host web applications
https://docs.psibase.io
MIT License
27 stars 7 forks source link

Rust services debuggable test wasms #770

Open sparkplug0025 opened 4 months ago

sparkplug0025 commented 4 months ago

Analogous to what we have in C++ where we generate -debug.wasm test files that allow us to step through gdb to debug our tests, we need the same for Rust land!

James-Mart commented 4 months ago

I think that dwarf data is already generated during compilation for wasm32-wasi debug builds. But we will need to make sure that any transformations/polyfilling that we do during the build process doesn't strip out or corrupt the dwarf data.

I assume if the dwarf data is intact, maybe debugging should be fairly straightforward with standard tooling?

Probably means we need a --debug flag for cargo-psibase build that leaves dwarf data intact.

@swatanabe can likely provide more context/constraints when you get to this one.