12 ms·
A broken ncurses text gui debugger with broken navigation and byzantine commands should somehow make us look more favorably upon gdb? We had better debuggers th
by gizmo 10y ago
A broken ncurses text gui debugger with broken navigation and byzantine commands should somehow make us look more favorably upon gdb? We had better debuggers than this in the early 80s. Turbo pascal had a decent debugger and IDE that was right built in!
How come the open source world hasn't been able to create a debugger that's as good as the (still primitive) debugger in Visual Studio 6.0? It's astonishing to me how bad the state of the art is.
- wbl 10y agoThey did: it's called Emacs.
- Roboprog 10y agoI don't understand the downvote. Debugging C with gdb + emacs (albeit 20 years ago) was a decent experience. Even for a vi user...
- ryanlm 10y agoI really feel like a cowboy when I am debugging C with `gdb`
- Roboprog 10y agoI guess I don't understand downvotes in general. "Your opinion is SO offensive to me, that I must attempt to expunge it from existence" - or at least move it way down and grayed out. Alternative thinking considered harmful. Douchebags gonna douche, I guess...
- sctb 10y agoPlease re-read the commenting guidelines carefully: https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- Roboprog 10y agoSorry, missed that second to the last one. No guidelines on downvoting, though???
- tomku 10y agoYou seem obsessed with other people's downvoting. Relax, seriously. If you think someone got a downvote they didn't deserve, upvote it yourself and move on. It's not your responsibility to police other people's voting behavior. Edit: If it really bugs you that much, post a comment backing the person up, but don't bring up the votes. It never adds anything except drama and distraction.
- CJefferson 10y agoIt often feels like (as a non-emacs, non-vi user), that every conversation ever will end up at some point with a post that says "use emacs" or "use vi". These tend to have zero actual content (emacs is a text editor. How would I use it with gdb?), and not provide any evidence, or guidance.
- wbl 10y agoYou just run it like any other interaction. In emacs if I want to compile a file I type M-x compile, and it asks me how. That creates a new buffer in which errors are linked to the original buffer. M-x gdb works the same way.
- Roboprog 10y agoEmacs would split the terminal screen, showing the gdb interpreter/prompt in the bottom pseudo-window where you could interact with it, and the source code for the current function in the top "window", with a visual "pointer" at the current line. I know you could put watch expressions into gdb, and I suspect there was a way to pull these into another emacs text window, as well. Gdb also had commands to list the stack and select a frame further down to see the callers data. I don't remember if the source code view (in emacs) would track the selected frame.
- deleted 10y ago[deleted]
- w0utert 10y ago>> How come the open source world hasn't been able to create a debugger that's as good as the (still primitive) debugger in Visual Studio 6.0? It's astonishing to me how bad the state of the art is. I keep asking myself that same question every now and then, why can XCode have such a nice and pleasant LLVM-based version of gdb, while gdb on linux still doesn't have even the most bare-bones GUI that let's me inspect common data types without jumping through hoops?
- adamnemecek 10y ago> LLVM-based version of gdb you mean lldb?
- bitwize 10y agoWhat you are looking for is GNU DDD. https://www.gnu.org/software/ddd/ https://www.gnu.org/software/ddd/
- w0utert 10y agoI use ddd, but I don't particularly like it. It's telling that after all those years we still don't have anything better, it seems like ddd today is still the same crutch as when I first used it, over 10 years ago.
- dman 10y agoThe market has spoken in terms of preferring free tools. I personally think that is one big reason why the quality of developer tools is as low as it is.
- bronson 10y agobecause free == low quality ??
- smallnamespace 10y agoNo, but there's certainly a positive correlation
- JustSomeNobody 10y agoPriorities and Laziness. Open source produces some amazing stuff because of laziness. It also produces a lot of "good enough" stuff because of laziness.
- ksk 10y ago>How come the open source world hasn't been able to create a debugger that's as good as the (still primitive) debugger in Visual Studio 6.0? It's astonishing to me how bad the state of the art is. Because nobody has hired developers to work on it. Most large scale projects (whether OSS or Proprietary) get done when someone bankrolls the development. And I suppose the reason nobody has hired developers is because its hard to make money on open source debuggers.
- wazari972 10y agoGDB development is driven mostly by Redhat and Mentors Graphics (ex Code Sourcery), and both of them often add new functionnalities, fix bugs and maintain GDB. But maybe their work is at too low level for most people to notice? I still wonder what's missing in GDB. I got quite proficient with this tool, and never had access to VS. I personnally don't count GUIs built on top of GDB, as they don't provide new capabilities, just 'fancier' interfaces that GDB's CLI.
- wolfgke 10y ago> I personnally don't count GUIs built on top of GDB, as they don't provide new capabilities, just 'fancier' interfaces that GDB's CLI. A strong visualisation and comfortable interface is not a new capability per se, but still a very important (some would even say "killer") feature.
- moron4hire 10y agoBecause the Cult of Torvalds is convinced using a debugger makes you a bad programmer.
- pag 10y agoWithout question, Windows has the best debugging facilities. windbg is the best debugger, and when you have source code, visual studio's debugger is super nice. But guess what, windbg has so many commands that it's kind of hard to use for newbies and there's some great commands that even experts don't know about unless you go digging. This is many ways is like the bad UI in gdb. Over time, you learn. Unfortunately, we're stuck with gdb, and improving it or making a new debugger requires massive effort and likely backing by one or more organizations (e.g. lldb has apple). The ugliness of gdb won't change, but this presentation isn't about gdb's shortcomings -- it's about a "version" of gdb that supports reverse-debugging, which is really awesome. I use undodb-gdb all the time and it's amazing. Consequently, I use gdb all the time. The result is that over time I've learned to deal with gdb's ugliness and so I get used to it. It's similar to complicated or hard-to-discover user interfaces in GUI programs.
- ZenoArrow 10y ago> "Unfortunately, we're stuck with gdb, and improving it or making a new debugger requires massive effort and likely backing by one or more organizations (e.g. lldb has apple)." What about rr? http://rr-project.org/ http://rr-project.org/ It's built on top of gdb, but seems to have a straightforward workflow (at first glance at least, I've not used it yet). https://github.com/mozilla/rr/wiki/Usage https://github.com/mozilla/rr/wiki/Usage
- pag 10y agoYou still use gdb for debugging with rr...
- ultramancool 10y ago> windbg is the best debugger How so? I saw this suggested in some places but I found windbg atrociously complicated, even compared to plain GDB. It can debug the windows kernel, but that's about the best I can say about it. x64dbg and IDA's debugger were far nicer to work with for all desktop reverse engineering purposes. In terms of non-RE debuggers, yeah, VS's is pretty good, but I don't find it that much better than anything else to say it's a must-have. Most source-level debuggers offer about the same feature set in only slightly different ways. It does the job and once you know one you pretty much know them all.
- fhood 10y agoBecause we already have the worlds greatest debugger. The Print (proper noun) statement.
- nrclark 10y agoI've had pretty good experiences with Eclipse's GDB interface - how does that stack up against VS6?
- ultramancool 10y agoYeah, I've had decent luck with both Eclipse and Qt Creator's interfaces. There's also excellent debuggers for Python like WinPDB. GDB itself has reverse debugging support which could be integrated into IDEs... https://www.gnu.org/software/gdb/news/reversible.html https://www.gnu.org/software/gdb/news/reversible.html
- IshKebab 10y agoBuggier. Much buggier.
- protomok 10y agoI recently switched from doing my C/C++ debugging in gdb to Eclipse here are some of my thoughts: -> Eclipse can be easily be started from the command line - e.g. "cdtdebug.sh -e ./a.out". A minimal version of Eclipse opens up, and you can immediately step through code, no need to create projects. -> While GDB TUI mode somewhat mitigates the issue of not having context when debugging it IMHO pales in comparison to seeing the full file in Eclipse. -> In Eclipse I can see so much more information than gdb. I can see several expressions all being updated, memory views, I can highlight expressions in code. With gdb I could only ever see one thing at a time. -> Although GDB has more functionality than Eclipse, I found since I couldn't remember certain GDB commands and so I just didn't use certain features that I find myself constantly using in Eclipse because it's just a click away.
- vitd 10y agoAmen! And it makes you wonder what it's doing to our young programmers? I first used gdb in college and had I not already been using Turbo Pascal and Lightspeed C's debuggers, I would probably would have decided that debugging was too much trouble. I see this a lot on Stack Overflow, too. People writing fairly complex code who don't know how to check the value of a variable in the debugger. It's both shocking and depressing.
- jonathankoren 10y agoBack when I coded C a lot, I'd use DDD. It had an ugly, but functional UI, that supported editing and recompilation. DDD itself supposedly works with a variety of debugger back ends (eg pydb), but I only used it with gdb and C. 20 years later apparently it's still maintained, even if it has plataeued. Personally, I'd like to see a more modern frontend made, perhaps for Atom. https://www.gnu.org/software/ddd/ https://www.gnu.org/software/ddd/
- vidarh 10y agoBecause most people using 1% of the functionality of even a debugger like gdb, if they're aware it exists in the first place. A debugger is something that helps sell an IDE by padding the feature list more than something most people will use much. I'm not saying it ought to be like that, but in more than two decades of watching developers work, my conclusion is that most developers 1) are unfamiliar with debuggers, 2) if they do know about debuggers they rarely use them, 3) if they do use them, they rarely use more than the very basics . I myself fall in category 3. I use gdb, and I'm fine with that because all I tend to use is going up and down the stack, displaying some expressions and occasionally single-stepping. I've used Visual Studio, and I've used DDD, and frankly I fall back to the above because it's quick, and because it's very rare that spending lots of time in the debugger is as helpful as writing more test cases or spending more time reasoning about the code. To displace more primitive debugging techniques, a debugger will need to be extremely quick to cut to the core of the problem and basically help automating what is often a very basic workflow to try to narrow down things like "that crash happened because of an incorrect value in x; when did x get that value and what contributed to that?" followed by "how did y get that value that contributed to the broken value in x". You can provide lots of fancy ways of making those kind of steps more pleasant, but they're doing too little to beat having a very minimal UI to deal with. Instead debuggers appears to largely have focused on making those hair-pulling frustrating and long but also exceedingly rare debugging sessions more pleasant. At least that's my impression: 99.9% of the time, I need something that's a smidgeon above a printf; 0.1% of the time I get frustrated enough to consider looking at more advanced tools, but that's not often enough to usually be worth it.
- stcredzero 10y agoA debugger is something that helps sell an IDE by padding the feature list more than something most people will use much. Because you have the most experience in environments where debuggers can only reach a small fraction of their potential. (Barely better than printf) Let me assure you that there are very different environments out there, and have been for decades.
- vidarh 10y ago
- eitland 10y agoSince VB is mentioned I guess I can mention another language that have good open source debuggers: Java. For all its warts Java has a pretty decent open source community and many of the best tools in Java land are open source. For example all the three major IDEs are available in open source versions, two of them are completely open source (although you can get commercial plugins) and all have decent debuggers.
- RX14 10y agoYes. The one thing I miss from Java development the most is debugging code from IntelliJ IDEA. Its just a fantastic experience to be able to step through line by line and see what's really going on, where it branches on each iteration and what state is changed. IntelliJ shows the current values of each variable next to where they are used in the source view, which really helps to narrow down the variables which are currently important.
- cmrdporcupine 10y agoThe debugger that is available in JetBrain's CLion IDE provides a good chunk of the IntelliJ IDEA debugger interface for C/C++. Likewise, AppCode does the same for Objective-C. They wrap around LLDB.
- grandinj 10y agoHear hear! This is, however, because the VM abstracts the bulk of the low level nastiness and exposes a reasonable API, which reduces the effort involved by an order of magnitude.
- zwieback 10y agoI almost always use gdb from Eclipse but it's nice to be able to ssh into a small system without GUI and still get baseline functionality, kind of like how I use vi.
- andrewstuart2 10y agoIf you count interpreted languages, then there are plenty of killer debuggers for JavaScript, at the very least. Chrome dev tools is just as good (probably better if you count all the tabs) as I remember Visual Studio's debugger being.
- Asooka 10y agoIn his defence, he didn't say he'll make you think gdb is the greatest, just change your perspective of it. A broken ncurses text gui debugger is miles better than viewing your code via basically ed commands. If all you have is gdb, then knowing how to use it more productively is certainly welcome. That's the situation with e.g. embedded development or debugging the kernel via a serial interface. It's still kind of crappy, but at least it's not ed.