3 ms·
It’s shocking how many people never use a debugger. Like sure printf debugging is good enough sometimes. But never? That’s wild. Honestly I think attaching a d
by forrestthewoods 2y ago
It’s shocking how many people never use a debugger. Like sure printf debugging is good enough sometimes. But never? That’s wild.
Honestly I think attaching a debugger should be the first debugging tool you reach for. Sometimes printf debugging is required. Sometimes printf debugging is even better. But a debugger should always be the tool of first choice.
And if your setup makes it difficult to attach a debugger then you should re-evaluate your setup. I definitely jump through hoops to make sure that all the components can be run locally so I can debug. Sure you’ll have some “only in production” type bugs. But the more bugs you can trivially debug locally the better.
Of course I also primarily write C++ code. If you’re stuck with JavaScript you maybe the calculus is different. I wouldn’t know.
- seba_dos1 2y agoTo be frank, I actually find debugger to rarely be useful. When it is useful, it is super useful - but those occasions aren't that numerous, so I can totally believe that many people may get away without learning how to use it. It feels like 90% of my time in gdb is reading backtraces after segfaults, which I wouldn't really consider to be a use of a debugger. I'm still glad I can use it for the other 10%, but it's just 10%.
- forrestthewoods 2y agoGDB is a dog shit trash debugger. I keep forgetting that Linux and Mac have shit tools. I suppose if the only debugger available to me were GDB I would also prefer printf debugging! The typical modern dev loves to shit on Windows. But Visual Studio (the adult version, not VSCode) is still a best-in-class debugger. Xcode is bloated as hell but did help me last week. Linux has… poor bastards.
- fragmede 2y agoHas VSCode, which also runs on Mac. Does Visual Studio do time traveling yet? https://www.replay.io/ https://www.replay.io/ is cross-platform.
- forrestthewoods 2y agoVSCode is an extremely mediocre debugger. It’s better than nothing. But it’s not great. WinDbg has a time traveling debugger. replay.io does not support a single language or environment that I care about.
- seba_dos1 2y agoI've spent plenty of time with various debuggers for various platforms and languages, both graphical and CLI-based, and it really doesn't matter to what I said. A debugger may be someone's preferred tool anyway, sure, but the cases where it's actually non-trivially improving workflow are relatively rare. Most of the time it just makes you a bit faster, if at all.
- forrestthewoods 2y agoI could not possibly disagree more strongly. But hey you do you.
- throwaway2037 2y agoWhat is wrong with JetBrains' CLion? It is a cross-platform C & C++ IDE. I have used it on Linux, and the GUI-based debugger is so much easier to use compared to GDB from the command line. Also: Do also say that LLDB is a "dog shit trash debugger"?