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

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!"


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

Search: