How make qt for wasm generate source map file using CMake?
Unsolved
Qt for WebAssembly
-
Hi @Sauntor, I've never used a source map file, so can't validate, but I added this to a demo Qt project's
CMakeLists.txt
file:if(EMSCRIPTEN) message(STATUS "This is an Emscripten build; adding source-map options.") add_compile_options(-gsource-map) add_link_options(-gsource-map) endif()
An it resulted in a corresponding
<project-name>.wasm.map
file being produced when building with a Qt 6.8.0 for WebAssembly (from the Online Installer).Cheers.
-
@Paul-Colby Thanks! It works, but it's still unable to debug the c++ code in the browser's devetools console, it seems the source map file does not work correctly for .wasm, all variables still stays in a format like var0, var1,...š
C/C++ DevTools Support extension not works too