Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
neeno31465ySetting breakpoints takes too much time and effort.... Much easier to add 8273827371 print statements like "sugma" "lol" "wtf" "lick ma balls" /s
-
Frankly I don't think debugger will help a lot to debug concurrency issues :) printf/echo/sout is the go-to technique when you need to project all the activity on a single timeline.
Debugger is somewhat useful, but it takes a split second to synchronize before blocking all the threads, which has hidden from me lots of critical section handling errors. printf is really irreplaceable here ;) -
hjk10156965yOnly two reasons to do that in my opinion.
1. Environment doesn't support debugger or has to be set up yet.
2. Stepping trough takes more time than analyzing output (looping trough a lot of data or the result is going through a large call stack that has no bugs). Sometimes you can add some code to work around this issue though: if data == ... {breakpoint}.
Being able to use a debugger saves so much time mainly because you can see all the state (often shows the problem or the direction to look in) greatly prefer it over printing. -
print("A") to print("Z")
Same for 0 to 9.
Sometimes print("AAA2") etc.
And sometimes print("Loop"), print(data), print("function call successfully executed")
I guess I'm too lazy to set up the proper debugger environment. -
mojo20127835ydamn exactly today i had a weird issue that only showed up on CI and on no other machine - repeatedly.
yep I admit it, I added log output 😂 -
There's VS Code extension that can manage and turn on/off debugging print lines. I don't know the name though.
Most of the times 😂
joke/meme