You can place ... import code code.interact(local=(locals().update(globals()), locals())[1]) ... anywhere in your handler function and it will halt execution and give you an interactive shell right within at the Flask development server's log window (with all current globals and locals available). -- Jonas
Just realized that with that I may overwrite local variables with global ones. Unlikely scenario, but to prevent: ... import code code.interact(local=(globals().update(locals()), globals())[1]) ... -- Jonas