Stepping with state in multi-threaded code
This tests that we can successfully complete a debugging session with state, including
setting breakpoints, deleting breakpoints, and stepping with multiple threads.
Steps
- Open DevTools
- Open stepping-with-state.wasm
- Inspect main thread:
- Set a breakpoint at function
addMultiply
on line local.get $var0
- Reload
- Breakpoint should hit set breakpoint in main thread
- Step 2 times and inspect the variables in the scope view
- Remove breakpoint
- Set a breakpoint at function
mul
on line local.get $var0
- Reload
- Breakpoint should hit the new breakpoint in main thread
- Step 2 times and inspect the variables in the scope view
- Resume
- Inspect worker thread:
- Set a breakpoint at function
divSub
on line local.get $var0
- Reload
- Breakpoint should hit set breakpoint in worker thread
- Step 2 times and inspect the variables in the scope view
- Remove breakpoint
- Set a breakpoint at function
div
on line local.get $var0
- Reload
- Breakpoint should hit the new breakpoint in worker thread
- Step 2 times and inspect the variables in the scope view
- Resume