No debug symbols on Windows

Hi, I’m trying to debug my program in command line on windows but I can’t figure out a way to make GDB or LLDB to recognize the debug symbols.
On the forum, I saw a post about the same problem but there is no real solution. In the post, it says that on windows GDB won’t recognize the .pdb file. I confirm that when I run

gdb my-prog.exe

I have the message :

(No debugging symbols found in …

and even:

gdb --exec=.\my-prog.exe --symbols=my-prog.pdb

gives me an error:

can’t read symbols: file format not recognized

So I tried with LLDB:

lldb my-prog.exe

and it says that I have a target created (with the good exe name and path) but then I’m not able to put any breakpoint anywhere.

Are they some people that managed to debug in command line on Windows?
Thanks!

I confirm that currently windows lldb 19.1 (and latest CodeLLDB windows vscode plugin) cannot set breakpoints, but they used to work.

See this thread for windows debugger recommendations: How to change the debug symbol format for zig build on windows

2 Likes

Yes that’s the thread I saw. I can debug with VSCode but I’m using Neovim and it’s really annoying to have to switch to VSCode only to debug. Even if I prefer command line debuggers, I also tried UI debug in Neovim with LLDB and a DAP plugin, but the result is the same.

Thanks for your reply!

1 Like

I use raddebugger on Windows these days. It’s a bit of an adjustment switching to something so gui-based from gdb, but I’ve had a pretty good experience with it. The main selling point is that it is a standalone executable.

1 Like

Thanks, I’ll give it a try then!