Stepping in original source with state and threads
This tests that we can successfully complete a debugging session with source maps, including
setting breakpoints, deleting breakpoints, and stepping.
Steps
Inspect main thread:
- Open DevTools
- Open stepping-with-state-and-threads.c
- Set a breakpoint at function
main
on line args *thread_args = (args*) malloc(sizeof(args));
- Reload
- Breakpoint should hit set breakpoint
- Step a few times until the next line is hit and inspect wasm variables
- Remove breakpoint
- Set a breakpoint at function
addConstant
on line for (int i = 0; i < length; ++i) {
- Reload
- Breakpoint should hit the new breakpoint
- Step a few times and inspect the wasm variables in the scope view
- Resume
Inspect worker thread:
- Set a breakpoint at function
threadEntryPoint
on line args *arguments = (args*) input;
- Reload
- Breakpoint should hit set breakpoint
- Step a few times until the next line is hit and inspect wasm variables
- Remove breakpoint
- Set a breakpoint at function
multiplyByConstant
on line for (int i = 0; i < length; ++i) {
- Reload
- Breakpoint should hit the new breakpoint
- Step a few times until the next line is hit and inspect the wasm variables in the scope view
- Remove breakpoint
- Resume