Hi,
Cmd below can be used to create Visual Studio project and build the executables.
cmake . -G "Visual Studio 17 2022"
cmake --build .
There will be exe and pdb files in Debug folder.
Then, you can select exe as the startup option, open the .c file in Visual Studio and add breakpoints for debugging.
Best regards,
Minxin Yu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.