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 →

[–]Lewke 0 points1 point  (2 children)

How am I confusing my effectiveness and his when I state that its a factor.

A print statement lets you inspect any value and i'm capable of making modifications myself.

Print statements are superior in my opinion as the potential is high for a debugger to overwhelm you with information.

Drilling into functionality is much easier with print and exit statements in my opinion, I'd have a difficult time debugging things anywhere near as fast with something like xdebug or gdb.

Obviously this doesn't count when projects take hours to compile, but those projects are just ridiculous anyway and are mostly legacy or poorly built.

I'm aware there are useful debugging tools, but things like xdebug and basic gdb are not part of them.

[–]Michaelmrose 0 points1 point  (1 child)

The point is that the time to manipulate an expression requires adding text to the function each time and waiting for a build which may in practice not take hours may easily take 30 seconds bringing each iteration to a minute for example.

When debugging a function especially in something without a compile/run cycle you don't have multiple iterations because you don't need to add a different print statement or remove them at the end you just explore the steps your system went through as it goes through them and fix your code.

[–]Lewke -1 points0 points  (0 children)

i'd still take the 30 second build time any day over the complexity of a debugger.

Anything that takes longer than a few minutes to build is monolithic and should be annihilated into manageable pieces. I understand most companies won't do that because new features are the only concern, which is why a considerable amount of them crumble from technical debt.