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!

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,643 questions
C++
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.
3,544 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,580 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
947 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. PengGe-MSFT 3,336 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