Live data from Hacker News

IceCream – Never use print() to debug again

github.com

21–24 of 24 posts

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

#22
post #14
post #2

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

Different tools for different cases. Debuggers are great for a snapshot in time but print statements are better for seeing the execution flow.

As a profession we need to phase out point in time debuggers and replace them with reverse debuggers or "time travel" debuggers

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

#23
post #22
post #14

Earlier quoted context omitted.

Different tools for different cases. Debuggers are great for a snapshot in time but print statements are better for seeing the execution flow.

As a profession we need to phase out point in time debuggers and replace them with reverse debuggers or "time travel" debuggers

I think PIT debuggers have their use especially with regards to altering state mid run, but this is the first time I've heard of reverse debugging and it seems incredibly useful, especially for multithreaded software I'm often debugging

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

#24

>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

My own TS project was inspired by IceCream: https://github.com/Leftium/gg#coding-agent-access

It began as a better `console.log()` for humans, but I ended up making it better for AI coding agents.

I got tired of copying dev console output, so coding agents can now just insert the exact calls they need and query the output without human intervention.

Post reply on HN