The previous documentation only covers how to enable debug info when embedding Wasmtime. This change should cover the commonly-asked question: how do I debug in Wasmtime?
587 B
587 B
Debugging WebAssembly
The following steps describe a common way to debug a WebAssembly module in Wasmtime:
-
Compile your WebAssembly with debug info enabled, usually
-g; for example:clang foo.c -g -o foo.wasm -
Run Wasmtime with the debug info enabled; this is
-gfrom the CLI andConfig::debug_info(true)in an embedding (e.g. see debugging in a Rust embedding) -
Use a supported debugger:
lldb -- wasmtime run -g foo.wasmgdb --args wasmtime run -g foo.wasm