@@ -168,6 +168,11 @@ For a debug build, use `-DCMAKE_BUILD_TYPE=Debug`. To tweak various settings (e.
168168use ` -DENABLE_DEVEL_DEFAULTS=ON ` .
169169
170170#### Using Visual Studio Code
171+ The following sections document useful extensions. Most of them require the "vscode marketplace" which might
172+ not be available in all distributions of Visual Studio Code (e.g. when using the Arch Linux ` code ` package one
173+ needs to install the ` code-marketplace ` package in addition).
174+
175+ Note that most of this has only been tested under GNU/Linux so far.
171176
172177##### clangd
173178To use ` clangd ` via Visual Studio Code install the
@@ -179,22 +184,31 @@ to the subdirs project in the individual projects (e.g.
179184directory in the subdirs project (e.g.
180185` compile_commands.json -> /…/build/presets/syncthingtray/arch-android-x86_64/compile_commands.json ` ).
181186
182- ##### Debugging
183- Install the extension [ C/C++] ( https://github.com/microsoft/vscode-cpptools ) from Microsoft. The repository
184- [ subdirs] ( https://github.com/Martchus/subdirs ) contains example configuration for Syncthing Tray.
187+ ##### Building and debugging
188+ Install the extension [ C/C++] ( https://github.com/microsoft/vscode-cpptools ) from Microsoft. To avoid having
189+ to create manual build tasks and launch configurations, install the
190+ [ CMake extension] ( https://github.com/microsoft/vscode-cmake-tools ) from Microsoft.
185191
186192The extension [ Native Debug] ( https://github.com/WebFreak001/code-debug ) works as well.
187193
188194Presumably [ CodeLLDB] ( https://github.com/vadimcn/codelldb ) (which also supports Rust) would work as well
189195but I haven't tested that yet.
190196
197+ The repository [ subdirs] ( https://github.com/Martchus/subdirs ) contains example configuration covering
198+ Syncthing Tray and a few other projects. It configures many tasks and launcher configurations for building and
199+ more manually. Not all projects and targets are covered, though. So it makes most sense to rely on the CMake
200+ extension to configure and build the various projects (using presets, see section below). A launcher config to
201+ launch the active/selected CMake target exists.
202+
191203##### Qt
192204To work on my C++ projects that use Qt it might be useful to install their
193- [ extension pack] ( https://marketplace.visualstudio.com/items?itemName=TheQtCompany.qt ) . This requires the
194- "vscode marketplace" which might not be available in all distributions of Visual Studio Code (e.g. when
195- using the Arch Linux ` code ` package one needs to install the ` code-marketplace ` package in addition).
205+ [ extension pack] ( https://marketplace.visualstudio.com/items?itemName=TheQtCompany.qt ) .
196206Compile the code with ` -DQT_QML_GENERATE_QMLLS_INI=ON ` for the QML language server to work.
197207
208+ The repository [ subdirs] ( https://github.com/Martchus/subdirs ) also contains a GDB init script and
209+ configuration for the extension [ C/C++] ( https://github.com/microsoft/vscode-cpptools ) to make pretty printing
210+ of Qt data types work in GDB using the printers from KDevelop.
211+
198212#### CMake presets
199213There are some generic [ presets] ( https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html ) available.
200214
0 commit comments