A chrome extension to provide a slightly easier debugging UI for WASM modules
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
background.js
console.html
console.js
debuggerContinue.png
debuggerPause.png
debuggerPausing.png
demangle.js
expr.js
expr.pegjs
hook.js
hook_loader.js
jquery-latest.js
jquery.terminal.min.css
jquery.terminal.min.js
manifest.json
math.min.js

README.md

This is a pretty feature bare gdb style debugger for WASM webpages. It works by using proxies to hook WASM module operations and providing a gdb view to set breakpoints and inspect memory.

This is currently only has a few features but works alright for some debugging some WASM memory corruption. The main feature is the easy of reading module memory.

How To

  • Enable the extension
  • Go to the page you want to debug and open the dev tools, the proxy hooks should start working.
  • Click the extension icon to open the debugger
  • Reload the page you want to debug. The debugger should say it loaded some wasm functions
  • Now you can set breakpoints in the debugger
  • Refreshing the original page will keep breakpoints and rerun the wasm

Features

  • i f to get a list of functions
  • disassemble <function name or number> Print the disassembly (via chrome) of the function. Can use function index number instead of name.
  • break <function>:<line> Set a break point on a given line of the disassembly (via chrome)
  • si Single step
  • c Continue execution
  • x/<num>[bhw][xd] <address> Examine memory like gdb. Must be broken to use.
  • Printing stack values on step

Limitiations

  • Many
  • Cannot see locals
  • Currently only works for a single page. If you change debug targets you will have to reload the plugin
  • Cannot catch crashes
  • Not sure how it would handle thread stuff but might be ok
  • No removing breakpoints atm