Hacker News new | ask | show | jobs
by saagarjha 2600 days ago
Debuggers are print statements with a slightly different “effort profile”. Adding the equivalent print statement is a little bit more annoying, but you can do this at any point during runtime and also drop down into the full debugger when you need it.
1 comments

When something goes wrong after X iterations, print statements can show the evolution better. That is one thing that debuggers don't do I think (track variables over time). Or do they and am I not finding this feature in IntelliJ? :O
GDB and LLDB allow you to put a print statement anywhere; they’re a strict superset of what you can do in code.