Re:PySnooper: Never use print for debugging again
by marcell on Monday April 22, 2019 @08:28PM
(#19724496)
FYI you can do
import pdb; pdb.set_trace()
It pulls up console debugger and is a standard python package.
Re:PySnooper: Never use print for debugging again
by AtHeartEngineer on Thursday May 02, 2019 @05:11PM
(#19812991)
With python 3.7 you can just do 'breakpoint()' now, and it'll import pdb and run settrace. It also allows you to use other debuggers, pretty cool.
Re:PySnooper: Never use print for debugging again
by scwoodal on Monday April 22, 2019 @09:17PM
(#19724786)
The visual of the entire traceback in the browser and the ability to drop into an interactive shell within a specific frame is (for me) a way better experience than pdb.
Re:PySnooper: Never use print for debugging again
by someguy1010 on Monday April 22, 2019 @10:22AM
(#19719126)
thanks for showing me this! I use the more I learn about django-extensions the more impressed I am with its features. Being able to interact with the django shell with a jupyter notebook is awesome too.
Re:PySnooper: Never use print for debugging again
by iamgopal on Monday April 22, 2019 @10:18AM
(#19719100)
This is what I'm going to try to use in every language from now on.
Re:PySnooper: Never use print for debugging again
by Xavdidtheshadow on Monday April 22, 2019 @06:04PM
(#19723470)
Except for JS, which will execute `1/0` happily and without complaint. For that, I usually do `undefined.foo`.
Re:PySnooper: Never use print for debugging again
by TazeTSchnitzel on Monday April 22, 2019 @07:45PM
(#19724234)
JS has a debugger keyword!
Re:PySnooper: Never use print for debugging again
by CaptainMarvel on Wednesday April 24, 2019 @04:23AM
(#19736509)
Python has one too now!
Re:PySnooper: Never use print for debugging again
by vraivroo on Monday April 22, 2019 @10:24AM
(#19719144)
This works in recent versions of Rails as well.
Re:PySnooper: Never use print for debugging again
by asplake on Monday April 22, 2019 @12:27PM
(#19720219)
Works for Flask too, same dev server
Re:PySnooper: Never use print for debugging again
by int_19h on Monday April 22, 2019 @10:22PM
(#19725075)
I wonder if they support breakpoint() ?
Re:PySnooper: Never use print for debugging again
by AtHeartEngineer on Thursday May 02, 2019 @05:13PM
(#19813005)
Lol this is pretty funny. I like your style.
[1] https://django-extensions.readthedocs.io/en/latest/runserver...
[2] https://werkzeug.palletsprojects.com/en/0.15.x/debug/#using-...