Debug Qt WebAssembly applications

To debug a Qt WebAssembly application:

  1. Open a launch.json file.
  2. Select Add Configuration, and then select the Qt:Debug Qt WASM with Chrome debug configuration.

The Qt: WASM Start task in the preLaunchTask section checks the required dependencies and prompts you to install them if necessary.

For multi-thread Qt WebAssembly applications, set the following configuration in settings.json:

"livePreview.httpHeaders": {
    "Cross-Origin-Embedder-Policy": "require-corp",
    "Cross-Origin-Opener-Policy": "same-origin",
    "Accept-Ranges": "bytes"
}

Otherwise, you might see the SharedArrayBuffer is not defined error.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.