Scopes

This tests that externref parameters, locals, globals, and tables are shown with all relevant information in DevTools when paused in a Wasm function. This includes showing the JavaScript objects stored in parameters, locals, globals, and tables.

Steps

  1. Open DevTools
  2. Locate the Wasm function foo from the externref.wasm module and set a breakpoint on the global.get $ref_mut_global line
  3. Reload the page
  4. Breakpoint should hit the new breakpoint
  5. Now look at the Scope in the DevTools and make sure that it shows all the necessary information mentioned above in an easily accessible fashion
  6. Remove the breakpoint
  7. Locate the Wasm function modify_table from the externref.wasm module and set a breakpoint on the i32.const 0 line
  8. Reload the page
  9. Breakpoint should hit the new breakpoint
  10. Now look at the Scope in the DevTools and make sure that it shows the refs table with the following three entries at the positions 1, 2, and 3: {extern: 'ref'}, {foo: 'bar'}, {hello: 'world'}
  11. Now type $incdec into the Console, that should show the WebAssembly table with the two entries