WebAssembly Debugger

Debug .wasm and .wat in your browser. Step instructions, set breakpoints and memory watchpoints, and step backward through the trace.

Advertisement

Step through a Wasm module, forward and backward

Open a .wasm binary or edit WebAssembly Text and inspect the module without installing a toolchain. The debugger decodes binary sections, function signatures, imports, exports, globals, tables, data segments, instruction offsets, control-flow structure and custom names. WAT is compiled with the WebAssembly Binary Toolkit and can be downloaded again as text or binary.

Reversible execution

Choose an exported function, provide typed arguments, and step into, over, or out of calls. Every instruction records the operand stack, locals, globals, call frames, table state, host-import calls, memory reads, and byte-level memory writes.

Because writes are recorded as reversible deltas, Step Back restores the previous state rather than replaying from the beginning. Drag the trace cursor to jump anywhere you have already been. Continuing from an earlier point discards the old future and starts a new timeline, which is how you test a different argument without losing the context you built up getting there.

Breakpoints pause before a selected instruction. Read, write and read/write watchpoints pause when an address range is touched, and the memory viewer highlights the bytes the current instruction read or wrote. "Last read" and "last write" jump to the most recent access of an address before the cursor, which is the fastest way to answer "what put this value here".

State comparison shows what changed between any two points in the trace. On a loop that is misbehaving, comparing iteration three to iteration four is usually more informative than watching either one.

Modules are modelled, not instantiated

Uploaded code is decoded and interpreted by a purpose-built interpreter. It is not handed to the browser's WebAssembly engine and instantiated. No filesystem or network capability is ever supplied.

Common WASI calls are modelled with deterministic, capability-free stubs: fd_write, proc_exit, random_get and clock_time_get. Standard output is captured in the UI. This is not a full WASI runtime, and a module that needs real files, sockets or processes receives safe zero-value stubs rather than working I/O.

Metadata the module carries

Custom sections often say more about provenance than the code does. The debugger summarises producers, target_features, linking, reloc.*, dylink.0, build ID and sourceMappingURL, and attributes size per section and per function. The size view answers "why is this bundle 4 MB" faster than any bundler report, because it points at the specific functions responsible.

Component Model envelopes are detected and reported with an explicit unsupported boundary. WIT interface inspection and component execution are scoped as later work rather than partially claimed here.

The security view

The security panel highlights powerful host imports, indirect calls, unbounded or unusually large memories, memory growth, shared memory, and explicit trap paths.

These are review leads, not a verdict. A clean report does not certify a module as safe, and a flagged import is often entirely legitimate. Use the panel to decide where to point the debugger, not to decide whether to trust a dependency.

Limits

Execution is capped at 50,000 instructions and 32 MiB of linear memory. The interpreter covers core numeric, control-flow, variable, table, memory, call, conversion, sign-extension, saturating-conversion and many bulk-memory instructions, plus commonly used reference-types operations. Modules using SIMD, threads, exception handling, GC or memory64 can still be inspected where decoding succeeds, but execution stops with a clear diagnostic at an unsupported instruction rather than guessing.

Typical uses

Diagnose a divide-by-zero, unreachable, invalid indirect-call or out-of-bounds trap by stepping to it and reading the state that produced it. Review a third-party module's imports and exported surface before integration. Trace compiler-generated control flow and inspect function-level dynamic coverage. Learn stack-machine execution with the editable factorial, memory, nested-call, WASI output and trap examples. Export a portable JSON trace for a bug report.

Frequently Asked Questions

Can I debug both .wasm binaries and WebAssembly Text files?+

Yes. Open a .wasm binary to decode it and generate an editable WAT representation, or open and build a .wat file directly. You can also start with one of the included factorial, memory, nested-call, WASI output, or trap examples.

Does this WebAssembly debugger upload or execute my module?+

No. Files stay in your browser. The tool validates and decodes the module, then models its instructions in a custom interpreter instead of instantiating the uploaded module as native WebAssembly. It grants no filesystem or network capabilities.

How does time-travel debugging work?+

Every executed instruction stores compact state metadata plus reversible memory deltas. Step Back or move the timeline cursor to restore the frames, locals, globals, stack, tables, output, deterministic random state, and changed memory bytes at that point. If you continue from the past, the future branch is replaced with a new trace.

What are memory watchpoints?+

A watchpoint is an address range that pauses execution after an instruction reads it, writes it, or either. The memory panel highlights reads and writes for the selected trace entry, and Last read or Last write jumps to the most recent access before the current cursor.

Can it run WASI modules?+

It supports deterministic, capability-free stubs for common small-module calls such as fd_write, proc_exit, random_get, and clock_time_get. Standard output is captured in the UI. It is not a full WASI runtime, and modules needing files, sockets, processes, or unsupported host APIs will receive safe zero-value stubs.

Which WebAssembly features can it execute?+

The interpreter covers core numeric, control-flow, variable, table, memory, call, conversion, sign-extension, saturating-conversion, and many bulk-memory instructions. Newer proposal families such as SIMD, threads, exceptions, GC, and memory64 are detected, but individual unsupported instructions may stop decoding or execution with a clear warning.

Is the security report a malware verdict?+

No. The report is a static review aid. It flags capabilities and patterns worth investigating, including host I/O imports, indirect calls, unbounded memory, memory growth, shared memory, and explicit trap paths. A clean report is not a guarantee that a module is safe.

Related tools

This tool is provided for informational and educational purposes only. All processing happens in your browser — no data is sent to or stored on our servers. While we strive for accuracy, we make no warranties about the completeness or reliability of results.