Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test: basic WAT debugging in js-debug #191545

Closed
2 tasks done
connor4312 opened this issue Aug 29, 2023 · 1 comment
Closed
2 tasks done

Test: basic WAT debugging in js-debug #191545

connor4312 opened this issue Aug 29, 2023 · 1 comment

Comments

@connor4312
Copy link
Member

connor4312 commented Aug 29, 2023

Refs: microsoft/vscode-js-debug#1789

Complexity: 3

Create Issue


This iteration js-debug learned to debug WebAssembly by automatically disassembling WASM into WAT (the WebAssembly text format). Give it a shot:

  1. Install js-debug-nightly
  2. Clone https://github.com/torch2424/wasm-by-example and code-insiders wasm-by-example/examples/reading-and-writing-graphics/demo/rust
  3. Run npx serve in the terminal
  4. Use Debug: Open Link to debug localhost:3000, or wherever serve is serving from
  5. Set a breakpoint on L51. Step in.
  6. Verify you see the decompiled WebAssembly .
  7. Set a breakpoint elsewhere in the WebAssembly (like on L78). See that it is verified, continue and check that it gets hit.
  8. Check that the Variables view is populated and the Debug Console works. The variables are pretty low-level, but they should be there.
  9. Stop debugging and start debugging again. Verify the breakpoint you set in the WASM before is hit again (restored across sessions.)
@luabud
Copy link
Member

luabud commented Aug 29, 2023

Tested with WSL and works as expected :)

@luabud luabud closed this as completed Aug 29, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Oct 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants