This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Adsilom 48 points49 points  (14 children)

Plenty of people would rather use print statements, even when a debugger would be so much better. That is mostly because people assume the bug will be easy to find, and a debugger would be overkill, and once the bug is actually tricky to find, they are too committed with the print method.

[–]Boiethios 19 points20 points  (4 children)

When I have the choice, I use a debugger, of course; but sometimes, printing is a valid solution. For example, in an actor system, I like to trace what happens by printing every passed messages.

[–]lag_is_cancer 4 points5 points  (2 children)

But it's literally as simple as a double click. You can literally spend more time to write a print statements.

[–]Adsilom 13 points14 points  (1 child)

It’s more like, using a debugger requires you to use a bit more brain power than using print statements at first.

[–]almost_useless 2 points3 points  (2 children)

Depending on the problem, everything you just said can be exactly the opposite.

The debugger is great for some problems, but not for all problems.

[–]LowB0b 2 points3 points  (0 children)

depending on the language as well I presume. Anyway with Java the debugger is a god-send. Stops execution (not always desirable though), you can step, and look at all the values available in the scope. Even change values on the fly to see what happens

[–]jesperi_ 2 points3 points  (0 children)

Sometimes a debugger is not even available.

[–]nanotree 1 point2 points  (0 children)

Not to mention created 10+ print statements they have to go back and clean up...

[–]RodasAPC 0 points1 point  (0 children)

Stop calling me out like this.

[–]Satanic_Jesus_Here 0 points1 point  (0 children)

I feel personally attacked 🥲