Error setting up debug mode with CMake in Visual Studio Code

irshadahamdok 6 Reputation points
2021-06-10T20:07:20.67+00:00

I'm currently using Visual Studio and CMake to run my .cpp codes. I have been able to compile my .cpp codes. My issue is that when I hit Ctrl + Fn + F5 to launch debug mode, I get the following error:

104319-tfut9.png

My launch.json is as follows:

104382-ifhrs.png

Here are what I tried to do to fix the issue, and none of them worked:

I added "miDebuggerPath": "/Users/name/.vscode/extensions/ms-vscode.cpptools-0.20.1/debugAdapters/lldb/bin/lldb-mi" to my launch.json, but it seems that CMake ignores this and continued to look for lldb in usr/bin, as seen below:

104422-fmgry.png

I followed the instructions here: https://github.com/lldb-tools/lldb-mi. Specifically, I used brew install llvm and cmake build . to install LLVM. Then I used git clone and cmake build . to install lldb-mi.

I re-installed Visual Studio Code

None of my attempts had any success with launching my VSCode debugger through CMake. I would really appreciate some help.

Thanks!

Developer technologies | Visual Studio | Debugging
Developer technologies | C++
Developer technologies | C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
Developer technologies | VB
Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other
A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. PengGe-MSFT 3,386 Reputation points
    2021-06-11T02:49:31.83+00:00

    Hi @irshadahamdok

    Welcome to Microsoft Q&A!

    Thank you for taking time to post this issue in Microsoft Q&A forum. Visual Studio Code is currently not supported in the Microsoft Q&A forums, the supported products are listed over here: https://learn.microsoft.com/en-us/answers/products/ (more to be added later on).

    You can ask questions and search for answers on Stack Overflow and enter issues and feature requests directly in our GitHub repository.
    Thanks for your understanding.

    Sincerely,
    Peng
    *
    If the answer is helpful, please click "Accept Answer" and upvote it.
    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

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.