It's been years since I've used a debugger (Turbo Debug), never bothered to learn how to use a debugger for non-assembly code, and tend to just sprinkle `print` everywhere until I can narrow down the problem.
I'm a Vim person, and am envious of IDE users with integrated breakpoints, stepping, and variable inspection with just a mouse, but only today found out about Vim's `termdebug` :headdesk:
So I'm wondering... what does the HN crowd use to investigate code problems:
- sprinkling print
- IDE with integrated debugger
- termdebug (i.e editor with gdb in another pane)
- debugger by hand on the command line
- other (please comment)
A traditional forwards-in-time debugger like gdb sometimes beats print debugging, but often not or not by much. OTOH a reverse-execution-capable debugger like https://rr-project.org (disclaimer: I'm a maintainer) enables much more powerful debugging strategies like "set a data watchpoint and reverse-continue to where the value was written", which trumps print-debugging strategies in many cases (e.g. memory corruption). I use rr a lot to debug my main project, Pernosco. FWIW Pernosco is written in Rust, and it does have a fair bit of logging built into it, but I still find rr very useful there.
Pernosco itself is a new kind of debugger (see https://pernos.co --- let me not be uncouth by promoting it too hard here). I don't use Pernosco to debug itself that much, partly because that's challenging for technical reasons, but also because it is certainly true that debugging tools are more valuable for large complicated projects you don't fully understand and Pernosco is not such a project (yet).