How to debug a CMakeLists.txt in MSVC 2022?

I read that it is possible to debug a CMakeLists.txt file in MSVC 2022 but I have not been able to accomplish it!!

Is it possible? How?


Regards,
Juan
Open up Visual Studio Installer, click modify and under "individual components" into search box type "cmake"

Check the "C++ Cmake tools for Windows" and install it.

I don't know if this let's you debug cmake files, debugging cmake files is rather strange because cmake isn't a programming language, however this component provides you with syntax highlighting and with cmake.exe to execute your cmake.txt files.
Configure CMake debugging sessions in Visual Studio

https://learn.microsoft.com/en-us/cpp/build/configure-cmake-debugging-sessions?view=msvc-170

Of course that doesn't debug the CMake file itself, it modifies whether a release or debug session is launched from an executable built using CMake.

It's amazing the information the internet has available when doing a 'net search instead of relying on others for answering questions. Hint, here's the DDG search I did.

https://duckduckgo.com/?t=ffab&q=visual+studio+cmake+debug+arguments&ia=web
Topic archived. No new replies allowed.