Hacker News new | past | comments | ask | show | jobs | submit login
Pleasant debugging with GDB and DDD (begriffs.com)
78 points by signa11 on July 17, 2022 | hide | past | favorite | 16 comments



I'm surprised at the article date (today, 17-Jul-2022). From the topic and content I would have expected that the article is at least 15 years old. If you want a "just works" debugging experience on Linux, try QtCreator, or VSCode with the CodeLLDB extension (an lldb frontend) or the Microsoft C/C++ extension (which provides a debugger frontend for gdb, lddb or the MSVC debugger).

The main downside of both VSCode extensions is the very limited data view panel (this is indeed an area where DDD was, and still is revolutionary), but unfortunately the whole are of user friendly debugging solutions is in stagnation or even regressing :/


DDD is really archaic, the UI is very much out of date and the fonts are hard(or impossible) to change,etc. It's for the last century. Still there is no decent alternative as of today.

I mainly use gdb -tui these days, with some vscode+gdb(or, is it lldb?), both worked OK for me, but neither is as complete as DDD.


Which kind of speaks wonders how well the community is aware of good debugging tools, or willing to contribute to improve them, versus the commercial OSes.


> If you want a "just works" debugging experience on Linux, try QtCreator, or VSCode with the CodeLLDB extension (an lldb frontend)

I can't tell you how many times QtCreator's debugging interface got stuck or didn't understand GDB. It's very frustrating. I'd rather use GDB directly instead. The only thing missing in GDB is an easy way to turn pretty printers on and off (they get in the way of looking at internals and don't always see past pointers especially smart pointers)

VSCode's debugging interface is... simple. I haven't used it much from trauma of using QtCreator's. Is it really decent?

> unfortunately the whole are of user friendly debugging solutions is in stagnation or even regressing

Sadly, I fully agree with the statement.


VSCode is much more than just a debugger, it is a whole environment. It doesn't really feel suitable if you are using a regular Linux development environment.


Seems pretty suitable to me. It is a great option.


I'm not saying it's a bad editor, but that it is a rather odd fit with a typical vim or emacs flow. If you're using VScode to debug, you are probably using it as your editor as well.


What the hell does 'vim or emacs flow' have to do with debugging?


While I completely agree with debugging UX worsening (and it boggles my mind), replaying debuggers are better than ever! https://rr-project.org/


<shameless plug>If you like rr and want a better UX try out https://pernos.co/ </shameless plug>


I'm always glad to see more :) Replay-based debugging is marvelous. There seems to have been a minor explosion in them, around when rr came out / became more widely known (not sure if it's cause, effect, or correlation due to hardware advances tho).


Instead of DDD, I would suggest using the graphical Emacs interface to GDB.

https://www.gnu.org/software/emacs/tour/images/gdb.png

(Image taken from the Emacs Tour: https://www.gnu.org/software/emacs/tour/)


i haven't seen or heard of DDD in many years, i always just thought it was a pretty front end for gdb...

but i never knew it had plotting support, holy moly! my absolute favorite way to debug very complex things is to visualize them. in a past life while debugging some fairly complex distributed systems issues i found myself yearning for plotting capabilities in my debugger, which were nary to be found.

as one gets older, it can be become harder to reason about lists of numbers in a terminal. that's what plots are made for, that's what plots solve. three cheers for computers that can plot!


I personally use the GDB with GDB Dashboard, disabling the assembly and the registers, but I think I will try DDD in the future :-)

One important thing to mention is how well shown is GDB scripting. I haven't used it or found out how to use it, but I save this article just in case I need it. Props to the writer.


What's wrong with people still using DDD in 2022?


Last release was 13 years ago, and it was archaic even then.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: