Hacker News new | past | comments | ask | show | jobs | submit 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!"



Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: