How to trigger werkzeug debugger

I’m trying to intentionally enter the Werkzeug interactive debugger using the snippet below, and placing debug() at desired breakpoints, but the browser never enter the debugger. All I get is an AssertionError in the command prompt.

if os.environ.get('FLASK_ENV') == 'development':
    DEBUG = True
    DEBUG = False

def debug():
    assert DEBUG == False

I’m trying to use this as an alternative to when ipdb doesn’t behave well, and until the highly anticipated dash-dev-tools comes out!

Is anyone also experiencing issues with intentionally entering the werkzeug interactive debugger?

My stack:

$ pip list | grep dash*
dash                      0.40.0
dash-core-components      0.45.0
dash-html-components      0.15.0
dash-renderer             0.21.0