Sur cette page

Déboguer des applications Qt WebAssembly

Pour déboguer une application Qt WebAssembly avec Chrome :

  1. Ouvrez un fichier launch.json. Pour plus d’informations, consultez la section Déboguer des applications Qt.
  2. Sélectionnez « Add Configuration », puis choisissez la configuration de débogage « Qt: Debug Qt WASM with Chrome ».

La tâche « Qt: WASM Start » de la section « preLaunchTask » vérifie les dépendances requises et vous invite à les installer si nécessaire.

Débogage d’applications multithread

Pour les applications Qt WebAssembly en mode « multi-thread », définissez la configuration suivante dans le fichier settings.json:

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

Sinon, vous risquez d'obtenir l'erreur « SharedArrayBuffer n'est pas défini ».

Voir également Débogage d'applications Qt et VS Code : Débogage.

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