It drives me crazy that half my coworkers do this, including a senior dev. I’ll be on a call trying to help debug something and it makes it so difficult not being able to set a breakpoint
I used to do debuggers until I started doing embedded and dipped my feet in multithreading (2 different projects). After many hours lost because the debugger straight lied to me about which line of code has been executed, a colleague suggested that I just do a printf like a filthy beginner. And 🤩it worked🤩 and I never went back to the unreliable world of debuggers. Even though now I’m mostly working with single-threaded python scripts.
and the one that keeps getting slept on for some reason, watch breakpoints - stop when foo is changed. Great for figuring out what is screwing with your data when foo mysteriously changes
There are literally university courses which confidently state “Console logging is far more used and better so we won’t talk about a debugger here”!
Like sure, it’s very likely to be used far more, but that doesn’t mean you shouldn’t at least offer some courses or modules about proper use of a debugger…
God, I wish. I’d throw money at whoever could implement such a thing. I guess its actually theoretically possible if you just sort of wrote the whole stack to an HDD but the amount of space that would take up lol.
But yeah, good logging (and not excessive logging!) is also extremely important
It drives me crazy that half my coworkers do this, including a senior dev. I’ll be on a call trying to help debug something and it makes it so difficult not being able to set a breakpoint
I used to do debuggers until I started doing embedded and dipped my feet in multithreading (2 different projects). After many hours lost because the debugger straight lied to me about which line of code has been executed, a colleague suggested that I just do a printf like a filthy beginner. And 🤩it worked🤩 and I never went back to the unreliable world of debuggers. Even though now I’m mostly working with single-threaded python scripts.
I console.dir and debugger; and breakpoint all day. You are allowed to mix your strategies.
console for quick and dirty understanding but inspector for more complex fixes.
and the one that keeps getting slept on for some reason, watch breakpoints - stop when
foo
is changed. Great for figuring out what is screwing with your data whenfoo
mysteriously changesThis right here. Time and place for both.
There are literally university courses which confidently state “Console logging is far more used and better so we won’t talk about a debugger here”!
Like sure, it’s very likely to be used far more, but that doesn’t mean you shouldn’t at least offer some courses or modules about proper use of a debugger…
Can you set a breakpoint in production two days ago to debug an incident, though?
God, I wish. I’d throw money at whoever could implement such a thing. I guess its actually theoretically possible if you just sort of wrote the whole stack to an HDD but the amount of space that would take up lol.
But yeah, good logging (and not excessive logging!) is also extremely important
https://github.com/rr-debugger/rr
Oh this is beautiful