-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debugging doesn't work with Clang 11 on Windows #6617
Comments
We are dependent on lldb-mi and are investigating a way to ship it on our own for LLVM 10+. We currently support lldb on macOS since we can link to XCode's version of liblldb.framework but there are many ways for Windows/Linux users to download liblldb. lldb-vscode.exe is actually its own VS Code extension that speaks VS Code Debug Adapter Protocol and not GDB-MI. |
I see, thanks for the clarification. Hope to see official support for the latest LLVM versions in VS Code soon. Would you mind expanding on what you mean by "there are many ways for Windows/Linux users to download liblldb"? (Unfortunately I'm not very familiar with how LLVM works - I've been using GCC and MSVC until now.) What would be the most reliable way of debugging Clang in VS Code on Windows?
|
At the moment, we recommend CodeLLDB to debug lldb-mi on Windows and Linux. We hope to provide a better experience for debugging with |
Thank you for the explanation. Hoping to see improved official LLDB debugging support soon! |
I have compiled llvm (13.0.0) and lldb-mi for windows myself, and it still doesn't work properly with lldb-mi in the right place The terminal says
The debug console says
but it doesn't look like it ever actually starts executing the exe to be debugged. Something must be going wrong with the MI protocol communication or something? Edit: updating to 1.7.0-insiders2 doesn't fix it Edit: should I create a new issue for this? If so, here or at the MIEngine github? |
2022 Feb 25 -- It seems I have the same issue...
is missing? |
Having same issue on Linux Mint (clang 10). |
Install pacman -S mingw-w64-x86_64-lldb-mi and you will get <your_MSYS2_installation_directory>\mingw64\bin\ Furthermore, the command above also installs By the way, the default |
2023 and still doesn't work... |
Hello, |
Hi, I tried the msys2 version but it just doesn't start at all. It stucks at the beginning. I am using the following config: {
"name": "test",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/debug/bin/a.exe",
"args": [ ],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [ ],
"externalConsole": false,
"MIMode": "lldb",
"miDebuggerPath": "lldb-mi",
}, I also tried build lldb-mi from https://github.com/lldb-tools/lldb-mi.git , it still doesn't work. However if I manually start lldb-mi from command line, it works flawlessly. So I am guessing there's something wrong with vscode-cpptools? |
So it's been almost 4 years since I opened this issue, and CodeLLDB is still the only way to debug Clang in VS Code on Windows. This extension seems to work just fine, but I would rather use the official VS Code C/C++ extension than a 3rd party one, and more importantly, that extension has not been updated in a year, so there's a risk that it may become broken at any point, which means I won't be able to debug my projects with Clang anymore. Any progress with the official LLDB debugging support? |
Unfortunately, it will not install on Windows on an ARM architecture. Which is really sad because that is where gdb falls down and lldb-mi would be really, really helpful. See my report in the Chocolatey discussion for this package. |
Type: Debugger
Describe the bug
lldb-mi.exe
being missing.To Reproduce
Please include a code sample and
launch.json
configuration.Steps to reproduce the behavior:
test.cpp
:tasks.json
:test
in the terminal prints out "Hello, World!".clang
. The message "Unable to start debugging. The value of miDebuggerPath is invalid" will be displayed.The
launch.json
file that was created by default is:First of all, the default
miDebuggerPath
isn't even a Windows path, since/usr/bin
doesn't exist on Windows. More importantly, even in the correct folder, which isC:\Program Files\LLVM\bin
, the filelldb-mi.exe
itself doesn't exist.I looked it up and apparently
lldb-mi
has been removed from recent versions of LLVM for some reason. Obviously, I don't want to downgrade to an older version of Clang just so I can use VS Code with it.Curiously, in
C:\Program Files\LLVM\bin
, there is a file namedlldb-vscode.exe
. However, after changingmiDebuggerPath
toC:/Program Files/LLVM/bin/lldb-vscode.exe
and pressing F5, the debugger starts but nothing happens in the terminal - the program just freezes. Typinglldb-vscode
in the terminal doesn't do anything either - it just exits without printing any output to the terminal. So I don't know what that file is actually supposed to do, but it doesn't seem to solve the problem of debugging in VS Code.The text was updated successfully, but these errors were encountered: