Running and Debugging (VSCode)

Building

To build sample program:

  • Press [Ctrl]+[Shift]+[B]
  • Press [Ctrl]+[Shift]+[P], Select “Run Task …”, then Select Build: Debug (or Release)

vscode-run-task vscode-run-task-2

Running Project without Debugging on VSCode

Press [Ctrl]+[Shift]+[P], Select “Run Task …”, then Select Run Local Server and Open Browser

vscode-run-task-3

With Chrome DWARF Debugging, you will be able to use variables watching in Chrome development tools. Follow the instructions in Debugging WebAssembly with modern tools.

Running Project with Debugging on VSCode

Debugging on VSCode is supported on Chrome, FireFox.

Chrome

Select Launch Chrome against localhost in the Run & Debug tab, and press ▶️.

start-debugging

Required extension is embedded in VSCode, but only source maps of WebAssembly is supported.

If you want to use source maps and variables dump, use extension WebAssembly on Chrome Debugger.

FireFox

Select Launch FireFox against localhost in the Run & Debug tab, and press ▶️.