Debuggers

From D Wiki
Revision as of 19:28, 9 April 2014 by Bruno.medeiros (talk | contribs) (preface about what to expect from compiler debug info)
Jump to: navigation, search

To debug D programs you need to use a debugger that understands the format of the debug symbols information that your chosen compiler produces. The quality of the debug symbols information might vary depending on which compiler you use and its underlying debug format. For example, some compiler configurations may present the names of variables and/or functions in it's C mangled form, instead of the natural D name.

Debugging support by compiler:

Compiler+Platform Format Debugger Supported functionality
DMD-Win32 OMF Mago/VisualD Good support: Breakpoints; Stack frames; Mostly pretty names ('.' shows up as '@'); Variable inspection; Visual Studio based.
WinDbg Supplied with the main D compiler zip file download. Overview
ddbg Doesn't seem to be working well. Project no longer maintained.
DMD-Win64 COFF Mago/VisualD TODO: same level of support as for win32?

DMD-Linux
GDC-Linux
LDC-Linux
GDC-Win32/64

DWARF GDB Good support: Breakpoints; Stack frames; Pretty names; Variable inspection;
ZeroBUGS "Modular debugger for C/C++/D programming languages (and virtually anything else that supports Stabs/DWARF debug formats)". Supported debugging functionality??
LDC-MinGW DWARF - DWARF debug symbol info seems to be broken for LLVM compiled with MinGW note

DMD-MacOS
GDC-MacOS
LDC-MacOS

? GDB Limited/outdated support? According to Jacob Carlberg:

"D symbols need to be prefixed with an extra underscore." "Line numbers don't work."

LLDB ?

Graphical debugger frontends:

Frontends providing support to a command-line debugger mentioned in the previous section.


Debugger Frontend Description Platform
GDB MonoD MonoDeveloped-based full D IDE. Has integration with the GDB debugger.

"Debugging (using MonoDevelop’s integrated gdb support on Linux currently)"

Linux?
GDB DDT Eclipse-based IDE. Has integration with the GDB debugger, including D support. (Debugging support is based on Eclipse CDT) Linux, Windows, MacOS
GDB Nemiver Graphical frontend to the GDB debugger, which supports full D syntax from version 7.2. Linux
GDB CGDB Command line frontend to the GDB debugger, which supports full D syntax from version 7.2.Shows code and the GDB console in split windows. Linux, MacOS
GDB DDD GNU DDD is a graphical front-end for command-line debuggers such as GDB. Usual front-end features such as viewing source code, viewing variables, etc. Linux
GDB Affinic Debugger Affinic Debugger GUI .aka. ADG, is designed as a graphical user interface for various debuggers. This version is specifically targeted on GDB, the GNU debugger. Linux, Windows, MacOS