Earlier quoted context omitted.
It's strange, when developing C# and the like I'd go crazy without a debugger... and yet, in Python I've hardly ever used one. That might be because it's hard to develop C# without already being in an environment that puts an emphasis on easy debugging (Visual Studio), whereas I'm developing Python in whatever text editor I happen to be using at the moment and never really bothered to try out anything other than the…
Writing Python (and most other languages) with a proper IDE with integrated debugger and all is like eating right and exercising: it's much better when you do it, you feel better while doing it, each time you start again you think "why did I ever give this up?", and yet it takes conscious effort to keep it up, circumstances just make it so tempting to fall off the train. 'Oh just checking the value of that constant,…
Icecream: Never use print() to debug again in Python
41–50 of 271 posts
Re: Icecream: Never use print() to debug again in Python
#42I am always going to use print to debug in every programming language I can until the day I die.
Re: Icecream: Never use print() to debug again in Python
#43I am always going to use print to debug in every programming language I can until the day I die.
Re: Icecream: Never use print() to debug again in Python
#44Earlier quoted context omitted.
Actually rust has the functionality of Icecream as a buildin command "dgb" and you quickly find yourself using it over print
No doubt blatantly ripped off the venerable print_r :P
According to the RFC, the direct inspiration for dbg! is Haskell's traceShowId (http://hackage.haskell.org/package/base-4.10.1.0/docs/Debug-...).
Re: Icecream: Never use print() to debug again in Python
#45I am always going to use print to debug in every programming language I can until the day I die.
Re: Icecream: Never use print() to debug again in Python
#46Re: Icecream: Never use print() to debug again in Python
#47I am always going to use print to debug in every programming language I can until the day I die.
Why not taking the (short) time to learn using a debugger? This is way more efficient way to work for complex situations.
Re: Icecream: Never use print() to debug again in Python
#48I am always going to use print to debug in every programming language I can until the day I die.
Why not taking the (short) time to learn using a debugger? This is way more efficient way to work for complex situations.
It's also way more inconvenient for simple situations or when trying to sift through in order to zero-in on the issue's rough location, spatial or temporal: unless the debugger is well integrated into the editor it requires syncing multiple sources of information (the debugger's breakpoints configuration and the actual source) — and resynchronising on every edit; and if the debugger is well integrated into the editor… now I'm locked into a specific editor.
Re: Icecream: Never use print() to debug again in Python
#49Earlier quoted context omitted.
Why not taking the (short) time to learn using a debugger? This is way more efficient way to work for complex situations.
I have debugger set in pycharm and use it all the time. I also use print all the time, often along with the debug tool. They are very complimentary and neither tool can do everything the other can.
Re: Icecream: Never use print() to debug again in Python
#50Why don't people just use a debugger? It boggles my mind that people live with print style debugging. Depending on the project, it can be such a timer waster and just plainly worse in all aspects. Especially in Pycharm for me, it is incredibly easy. Even when running over ssh in remote computers I can use my debugger.
The worst part is, I think a lot of devs resort to print-debugging which in turn leads to writing sloppy code - e.g. avoiding function calls to be able to access state, etc.