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:
    1. Open DevTools
    2. Open stepping-with-state-and-threads.c
    3. Set a breakpoint at function main on line args *thread_args = (args*) malloc(sizeof(args));
    4. Reload
    5. Breakpoint should hit set breakpoint
    6. Step a few times until the next line is hit and inspect wasm variables
    7. Remove breakpoint
    8. Set a breakpoint at function addConstant on line for (int i = 0; i < length; ++i) {
    9. Reload
    10. Breakpoint should hit the new breakpoint
    11. Step a few times and inspect the wasm variables in the scope view
    12. Resume
  • Inspect worker thread:
    1. Set a breakpoint at function threadEntryPoint on line args *arguments = (args*) input;
    2. Reload
    3. Breakpoint should hit set breakpoint
    4. Step a few times until the next line is hit and inspect wasm variables
    5. Remove breakpoint
    6. Set a breakpoint at function multiplyByConstant on line for (int i = 0; i < length; ++i) {
    7. Reload
    8. Breakpoint should hit the new breakpoint
    9. Step a few times until the next line is hit and inspect the wasm variables in the scope view
    10. Remove breakpoint
    11. Resume