Re:Icecream: Never use print() to debug again in Python
by tstrimple on Tuesday March 30, 2021 @09:32AM
(#26634399)
Print debugging has all of those features and is natively built into just about every programming language in existence and doesn’t require any additional libraries or tools.
Re:Icecream: Never use print() to debug again in Python
by marcosdumay on Tuesday March 30, 2021 @08:46AM
(#26633927)
> The main argument that I have seen is that in print debugging you are relying on the program being executed in a non-descriptive/non-declarative fashion.
Breakpoints are way worse on this dimension.
The main argument that I have seen is that in print debugging you are relying on the program being executed in a non-descriptive/non-declarative fashion.
I legitimately believe print debugging is incredibly powerful (With a simple print I can check if a function is being called, how many times, if the value has the value I expected and the only requirement I need is to be able to see the stdout of the process. I say that is fantastic!
The real world is all about cost analysis. How much value can I get from a tool vs setup and running cost. The cost of print debugging is incredibly small.