Debugging using LLDB on Windows

I have been looking around and it doesn't seem like there are a lot of Windows using LLDB. I can't find any official info about whether or not it is supported and I haven't been able to get it to work myself. Is there anyone here that can share there experience?

Here is what I have done so far:

Create a Rust project, load that executable in lldb and try to break in a breakpoint:

cargo new lldb-test
cd lldb-test
cargo build
lldb .\target\debug\lldb-test.exe

in the lldb REPL:

(lldb) image list
[  0] B0075AFD-6D58-4D2C-9A92-229CECAB68C7-00000001 0x0000000140000000 <my_path>\lldb-test\ta
(lldb) b
Breakpoint 1: no locations (pending).
WARNING:  Unable to resolve breakpoint to any actual locations.

and if I run it never breaks in the bp.

I tried this on WSL and it worked just fine (stopped in the bp).

I'm using:
lldb version 16.0.1, installed with chocolatey.
Windows 10.

it is supported. I suspect your problem might be caused by incompatible debug formats. what is your rust toolchain triplet?

if you debug via vscode extension (I believe it is called code-lldb or CodeLldb), it works out of the box.

I assume it is x86_64-pc-windows-msvc. Isn't that the default on Windows? I haven't changed anything.

I don't use vscode

that's strange, I just check my installation, both lldb installed with the llvm package and the one used by the vscode extension work fine, and I tried msvc and gnu toolchains, both are supported too. my llvm is installed via scoop, but it is the same binary package from upstream I don't know about chocolatey though.

my versions

Y:\tracey>lldb --version
lldb version 15.0.7
Y:\tracey>D:\Applications\scoop\persist\vscode\data\extensions\vadimcn.vscode-lldb-1.9.0\lldb\bin\lldb.exe --version
lldb version 16.0.0-custom

could you maybe try the custom built lldb binary maintained by the vscode-lldb extension? its version string indicates it is configured specially for rust, and can be download from its github release page, choose the platform specific package for windows, the .vsix suffix is just a zip package.

I turned out this issue was cause by the fact that msdia14.dll wasn't in the path. For me the path is C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\DIA SDK\bin\amd64

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.