Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, the interactive debugger in Werkzeug[1] is fantastic! I couldn't tell you how many times I've deliberately put "asdf.asdf" in a method to deliberately throw an exception so that I can play around inside the debugger.

One more Flask thing: Flask-Login[2] is a popular way of managing sessions.

1. Werkzeug is the WSGI utility library upon which Flask is built. If you do enough stuff in Flask, you'll probably end up learning something about it, which is okay, because the documentation — like Flask's — is excellent.

2. http://packages.python.org/Flask-Login/



Stick this in your app and you can call the debugger however you wish by customizing the function name, and it will only throw in debugger mode (in case you forget it):

  from flask import current_app

  def asdf():
      assert current_app.debug == False, "You just called debug!"




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: