3 ms·
I think print statement makes it quicker and obvious to expose the internal state I want to observe at the precise point I want, thus fulfilling the hypothesis
by tanilama 7y ago
I think print statement makes it quicker and obvious to expose the internal state I want to observe at the precise point I want, thus fulfilling the hypothesis cycle faster. Debugger, on the other hand, seems effort taking to set up and expose too much additional details, it becomes overwhelming very quickly.
- saagarjha 7y agoDebuggers 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.
- Insanity 7y agoWhen 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
- saagarjha 7y agoGDB and LLDB allow you to put a print statement anywhere; they’re a strict superset of what you can do in code.
- nradov 7y agoIf you believe that, then you're probably using a poor debugger or just haven't learned how to use a really powerful debugger yet.