News for hackers. Stuff that matters.
Re:Ask HN: Why are we not using debuggers more? by bjourne on Thursday August 18, 2022 @05:46PM (#32515284)
My preferred debug method is to have a program that I run to verify that it misbehaves. Then I remove some part of the source code, rerun it and verify that it still misbehaves. If it doesn't misbehave, I reinstate the removed code and I remove a part of the reinstated code that I suspect is misbehaving and then I rerun the program. This continues until I have found the offending line, at which point fixing the bug usually becomes trivial. Debuggers are nigh useless in this workflow.

I do use a lot of analysis tools like Valgrind which imho are way more useful than debuggers. Linters and static analysis tools can also be really useful for early bug detection.

There are no comments on this comment yet.