Debugging improvements - Visual Studio Natvis, GDB, LLDB

WebFreak001 d.forum at webfreak.org
Tue Apr 6 21:04:47 UTC 2021


I have created editor independent pretty printers / visualization 
files for Visual Studio's debugger\*, GDB and LLDB.

The script and setup guide are available here: 
https://github.com/Pure-D/dlang-debug

If you want to, please try them out, they make each of the 
debuggers a lot more capable at debugging D! If you find any bugs 
or tested what is untested in the README, please consider opening 
issues / making PRs.

The files all add support for:
- string/wstring/dstring (GDB and VSDBG take length as max 
length, LLDB can actually read over null bytes)
- arrays (LDC, partially with DMD)
- associative arrays (LDC, very partially with DMD)

These debug configurations have been tested with VSCode and will 
all be bundled with next code-d release. An alpha can be found on 
Discord. Other editors will also work, Visual Studio can also use 
the Natvis file.

Additionally these scripts could be used to add debugging support 
to standard library types / popular data types. If you have ideas 
for some you commonly use and want to debug, post a reply here or 
make an issue.

\*: only when program is compiled with -gc


More information about the Digitalmars-d-announce mailing list