Re:Icecream: Never use print() to debug again in Python
by matheusmoreira on Tuesday March 30, 2021 @05:38PM
(#26640881)
Would be nice if instead of break points debuggers had log points which stored the values of variables at that point in time. This data can be displayed as a table later.
Re:Icecream: Never use print() to debug again in Python
by roca on Tuesday March 30, 2021 @06:06PM
(#26641169)
You might be interested in Pernosco: see https://pernos.co/about/overview/ and its related content.
We agree with your critique of traditional debuggers and Pernosco tackles that "temporal visibility" problem head on.
Re:Icecream: Never use print() to debug again in Python
by jonnycomputer on Tuesday March 30, 2021 @02:55PM
(#26638772)
I more or less agree; but I find myself wondering why I so often use Matlab's debugger, but almost never use pdb for python. It is not like I'm not used to using command line tools (I use bash, git, emacs, etc. everyday). It could just be an accident of habit, I don't know.
More fairly, it is a trade-off with the debugger giving wide visibility into state, but narrow visibility temporally, and logging giving narrow visibility into state (just what you logged), but broad temporal visibility. They both have their place, but I find that logging narrows things down more quickly, while the debugger helps me understand the problem by walking through step-by-step, assuming the problem isn't obvious once narrowed down.