visual studio 2022 integration

166 views
Skip to first unread message

alecie

unread,
Sep 11, 2022, 10:58:48 AM9/11/22
to emscripten-discuss
In the documentation there is only a mention about vs2010.

How would it be possible to integrate emscripten build into visual studio 2022?

Floh

unread,
Sep 12, 2022, 7:39:48 AM9/12/22
to emscripten-discuss
AFAIK the VS integration is abandoned (and debugging didn't work anyway, which IMHO would be the most important feature of an IDE integration).

For myself, I have cobbled together Emscripten + VSCode support via my cmake wrapper 'fips' (https://floooh.github.io/fips/) (only for building though, no debugging either - but with fips I can easily switch between Emscripten and native build configs, and debugging happens on a native build), I think with the new 'cmake presets' feature (https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html) it should be possible to do the same with builtin cmake features (if that feature would have been available when starting with fips it would have saved me a lot of work).

The ingredients would basically be the cmake toolchain file which comes in the Emscripten SDK (https://github.com/emscripten-core/emscripten/blob/main/cmake/Modules/Platform/Emscripten.cmake), a CMakePresets.json file which defines a cmake preset which uses this toolchain file, and maybe the "CMake Tools" extension for VSCode (https://github.com/microsoft/vscode-cmake-tools) - not sure though if this extension already has builtin support for cmake presets.

This still would only provide support for building though, not debugging. But with cmake-presets it should be easy to switch between an Emscripten build config and a native build config (where the native build config could be used for debugging).

Cheers!
-Floh.

Reply all
Reply to author
Forward
0 new messages