4 days ago

Hi,

I'm testing dlang in ubuntu with vscode and some extensions, I can debug a valid executable with codelldb and set breakpoints in the d code.

Then I realized that the unittest executable file is also generated in the work folder after I run "dub test -b debug". Then I would like to debug into that unittest executable file just as I did previously to other valid dlang executable files.

But the debug seems to run ok but the breakpoints never stop, why? maybe no debug info in that unitttest executable file?

Thanks.

4 days ago

On Tuesday, 2 September 2025 at 14:03:44 UTC, felixfxu wrote:

>

Then I realized that the unittest executable file is also generated in the work folder after I run "dub test -b debug". Then I would like to debug into that unittest executable file just as I did previously to other valid dlang executable files.

By far the easiest way I've found to set breakpoints with gdb is by line number:

  b <source file.d>:<line #>

That works quite reliably, even when the maze of demangling doesn't quite get me there. And yes, I have used it on -unittest compilations. I do not use dub, so if it's adding wrinkles, I can't help you there.

Andy