このページでは

Qt WebAssembly アプリケーションのデバッグ

Chrome を使用して Qt WebAssembly アプリケーションをデバッグするには:

  1. launch.jsonファイルを開きます。詳細については、「Qt アプリケーションのデバッグ」を参照してください。
  2. Add Configuration 」を選択し、次に「Qt: Debug Qt WASM with Chrome 」デバッグ構成を選択します。

preLaunchTask 」セクションにある「Qt: WASM Start 」タスクは、必要な依存関係を確認し、必要に応じてインストールを促します。

マルチスレッドアプリケーションのデバッグ

multi-thread のQt WebAssemblyアプリケーションについては、settings.jsonで以下の設定を行ってください。

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

そうしないと、「SharedArrayBuffer is not defined」というエラーが表示される可能性があります。

Qt アプリケーションのデバッグ」および「VS Code: デバッグも参照してください

© 2026 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.