How to debug a plugin using Visual Studio (CMake)

I’m having trouble getting a VST3 plugin to run inside the VS Debugger. The plugin is built from a CMake project, and the auto-generated JSON configuration files aren’t finding the right target (the target in this case being the VST host).

Here is what I’ve done so far:

  1. Open the CMake folder and let Visual Studio auto-configure from the CMakeLists.txt file.
  2. Build the project. (The build was successful: I’ve tested it inside a DAW).
  3. Select “Add debug configuration” from the “CMake targets view” in Solution Manager. This generated a lanch.vs.json file (aka `launch_shema.json).
  4. Edited the "projectTarget" and "name" terms in that file to point them towards the VST host.

After these steps, I can start the debugger, but it just opens up an empty console window–not the desired VST host.

Here is the contents of my launch.vs.json file:

  "version": "0.2.1",
  "defaults": {},
  "configurations": [
      "type": "default",
      "project": "CMakeLists.txt",
      "projectTarget": "Waveform 11 (64-bit).exe (C:\\Program Files\\Tracktion\\Waveform 11\\Waveform 11 (64-bit).exe)",
      "name": "Waveform 11 (64-bit).exe (C:\\Program Files\\Tracktion\\Waveform 11\\Waveform 11 (64-bit).exe)"

The situation is made more difficult because the target filename is "Waveform 11 (64-bit).exe"; I’m not sure if I should be escaping the brackets or the white spaces. However, nothing that I do to this file seems to make any difference–even if I break it by changing "configurations" to "configurationsxxxx", it still gives me the same console window, indicating that the file isn’t being read in the first place.

Does anyone have any suggestions?

I would like to know too.
I’m only able to debug VST targets after generating a VS solution using cmake -G "Visual Studio 16 2019" -S . -B build".

Opening with the ‘native’ VS CMake support only allows me to debug standalone targets - but it’s possible I’m missing something.

Would be interested in a solution too! Or if this is impossible for some reason, how does the workflow of other Windows developers using CMake for plugin development look like?