October 22nd, 2024
heart2 reactions

Debug CMake Scripts on Linux with Visual Studio

Senior Product Manager

If you are working on a CMake project that targets Linux, you may have encountered some challenges when trying to debug your CMake scripts and CMakeLists.txt files. You may have wondered why your variables are not set correctly, or why your custom commands are not executed as expected. Or you may have simply wanted to step through your CMake scripts and see what is happening behind the scenes of the configure step.

We are excited to announce that the CMake debugger in Visual Studio now has support for CMake projects targeting Linux via WSL or SSH. The CMake debugger allows you to debug your CMake scripts and CMakeLists.txt files using the familiar Visual Studio debugger experience.

You will need CMake version 3.27 or greater installed on your remote Linux machine to have access to the CMake debugging feature.