[HN Gopher] Pleasant debugging with GDB and DDD
       ___________________________________________________________________
        
       Pleasant debugging with GDB and DDD
        
       Author : signa11
       Score  : 69 points
       Date   : 2022-07-17 11:17 UTC (11 hours ago)
        
 (HTM) web link (begriffs.com)
 (TXT) w3m dump (begriffs.com)
        
       | flohofwoe wrote:
       | 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
       | :/
        
         | tovej wrote:
         | 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.
        
           | tkuraku wrote:
           | Seems pretty suitable to me. It is a great option.
        
             | tovej wrote:
             | 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.
        
               | snarfy wrote:
               | What the hell does 'vim or emacs flow' have to do with
               | debugging?
        
         | synergy20 wrote:
         | 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.
        
           | pjmlp wrote:
           | 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.
        
         | Groxx wrote:
         | While I completely agree with debugging UX worsening (and it
         | boggles my mind), replaying debuggers are better than ever!
         | https://rr-project.org/
        
           | khuey wrote:
           | <shameless plug>If you like rr and want a better UX try out
           | https://pernos.co/ </shameless plug>
        
             | Groxx wrote:
             | 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).
        
         | inetknght wrote:
         | > _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.
        
       | jmrm wrote:
       | 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.
        
       | a-dub wrote:
       | 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!
        
       | zonovar wrote:
       | What's wrong with people still using DDD in 2022?
        
         | [deleted]
        
       | teddyh wrote:
       | 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/)
        
       ___________________________________________________________________
       (page generated 2022-07-17 23:02 UTC)