5 ms·
Pleasant debugging with GDB and DDD
- flohofwoe 4y agoI'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 :/
- synergy20 4y agoDDD 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.
- pjmlp 4y agoWhich 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.
- tovej 4y agoVSCode 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.
- tkuraku 4y agoSeems pretty suitable to me. It is a great option.
- Groxx 4y agoWhile I completely agree with debugging UX worsening (and it boggles my mind), replaying debuggers are better than ever! https://rr-project.org/ https://rr-project.org/
- khuey 4y ago<shameless plug>If you like rr and want a better UX try out https://pernos.co/ https://pernos.co/ </shameless plug>
- Groxx 4y agoI'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).
- inetknght 4y ago> 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.
- zonovar 4y agoWhat's wrong with people still using DDD in 2022?
- deleted 4y ago[deleted]
- the_biot 4y agoLast release was 13 years ago, and it was archaic even then.
- teddyh 4y agoInstead of DDD, I would suggest using the graphical Emacs interface to GDB. https://www.gnu.org/software/emacs/tour/images/gdb.png https://www.gnu.org/software/emacs/tour/images/gdb.png (Image taken from the Emacs Tour: https://www.gnu.org/software/emacs/tour/ https://www.gnu.org/software/emacs/tour/)
- a-dub 4y agoi 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!
- jmrm 4y agoI 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.