logoalt Hacker News

IceCream – Never use print() to debug again

28 pointsby gregsadetskyyesterday at 1:39 AM12 commentsview on HN

Comments

oweileryesterday at 7:21 AM

Or use tests and/or a debugger. Which gives you all the listed benefits w/o an additional dependency.

show 1 reply
awoimbeeyesterday at 9:28 AM

Debugging in python is already so easy with `print(f"{myvar=}")` and `breakpoint()`...

show 1 reply
RockRobotRockyesterday at 7:43 AM

>Do you ever use print() or log() to debug your code?

I haven't written my own code in months at this point...kind of depressing to think about

smackeyackyyesterday at 11:51 AM

I haven’t used print for debugging for ages. Now it’s all trace on azure and hope your bug ends up in the sampled data in whatever that stupid thing is called. App insights or some rubbish. Apparently a good old log file just isn’t good enough it has to be larded up with a query language. Grep was fine guys.

Borborygymusyesterday at 10:30 AM

Remember COBOL's EXHIBIT?

IshKebabyesterday at 3:11 PM

...use slightly fancier print() instead!

soiziyesterday at 8:44 AM

why another tool for that ? think standard with other team/company and use the same integrated ones.

imagentyesterday at 11:45 AM

[dead]