PySnooper: Never use print for debugging again
171–175 of 175 posts
Re: PySnooper: Never use print for debugging again
#172For my Django projects the development server is werkzeug [1] and anywhere a break point is needed I'll add 1/0 in the code then hit refresh in the browser which pulls up an interactive debugger [2]. [1] https://django-extensions.readthedocs.io/en/latest/runserver... [2] https://werkzeug.palletsprojects.com/en/0.15.x/debug/#using-...
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
#173For my Django projects the development server is werkzeug [1] and anywhere a break point is needed I'll add 1/0 in the code then hit refresh in the browser which pulls up an interactive debugger [2]. [1] https://django-extensions.readthedocs.io/en/latest/runserver... [2] https://werkzeug.palletsprojects.com/en/0.15.x/debug/#using-...
Re: PySnooper: Never use print for debugging again
#174Again, Ram - it's a really nice project. Good luck with it. But just in case if you from print cult, you will like https://github.com/gruns/icecream
Re: PySnooper: Never use print for debugging again
#175This is a thoughtful hack but the real solution here is a) make debuggers easier to set up and b) make your project easily debuggable with a debugger from the beginning. Like, debugging should be considered part of programming, and a local dev environment that can’t be debugged should be viewed to be as broken as a codebase without e.g. a way to run the server in watch mode. Also someone should make a debugger that s…