Good question, I found this: this and this (halfway down the page, "debugging C++ binaries"), but I have a feeling you may have found the same pages. In short, if you are using the CMake version integrated into VS, then the VS_DEBUGGER_WORKING_DIRECTORY method will not work, because it uses a generator (Ninja) which never explicitly generates project files. The standalone CMake version should fare better, although one of the posts seems to suggest that it won't work either. I haven't yet managed to get the launch.vs.json method to work.As a side note, is there a way to configure the CMake project to set the debugger's working directory so I can launch the VS debugger from directly inside the IDE while configuring a working directory for it (like you can do with .vcxproj projects)? Currently I'm having to launch Orbiter from the command line (because otherwise the working directory is wrong) and then use 'attach to process' to debug it, but that's proving to be quite clunky. From Googling it, I found references to setting a project property named VS_DEBUGGER_WORKING_DIRECTORY, but I couldn't figure out where to set that.
This is where the generators come in which translate the CMake code into makefiles, project files or anything else required on a specific platform to build a project. When using standalone CMake to configure a project, you have a choice of generators. The VS2019 generator translates CMake into VS2019 vcxproj and sln files which can then be loaded into VS as usual. The version built into VS uses Ninja, which seems more tightly integrated into the build process. It never creates project files but somehow feeds the CMake information directly to VS. Unfortunately both seem to have weaknesses, so it's up to preference. Maybe you could try the standalone CMake version for comparison?One more question -- is there a tool to convert a CMake project to a .vcxproj project? I'm much more familiar with those projects than CMake. If not, no biggie.![]()