Live data from Hacker News

IceCream – Never use print() to debug again

github.com

1–10 of 24 posts

Re: IceCream – Never use print() to debug again

#4
post #2

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

Yeah, the amount of wasted hours with 1960's teletype debugging.

Ah but servers and embedded, that is why telemetry, execution traces, and debugger controlled action points exist.

Re: IceCream – Never use print() to debug again

#9
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.

Re: IceCream – Never use print() to debug again

#10
post #6

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

This is the correct answer. `ic(foo(123))` can be written as `print(f'{foo(123)=}')` without depending on yet another third-party library which is not pulling its weight.
Post reply on HN