Replies: 4 comments 1 reply
|
The breakpoint() call is meant for interactive debugging and isn’t suitable for a running Flask application, especially in a multi-threaded environment. Remove it from the /status route |
|
Yea, but I want to debug at some point. And it worked in the past...
…On July 18, 2025 11:49:15 PM GMT+02:00, Yasmine Hichri ***@***.***> wrote:
The breakpoint() call is meant for interactive debugging and isn’t suitable for a running Flask application, especially in a multi-threaded environment. Remove it from the /status route
--
Reply to this email directly or view it on GitHub:
#5771 (comment)
You are receiving this because you authored the thread.
Message ID: ***@***.***>
|
|
Adding to the existing comment: this is caused by running the Flask development server in threaded mode and then entering pdbpp from inside a request handler. Since Flask 1.0, the development server runs with For local interactive debugging, disable request threading: if __name__ == "__main__":
app.run(debug=True, threaded=False)Or, if you start the app with the Flask CLI: flask run --without-threadsWith threading disabled, requests are handled sequentially on the main thread, so The trade-off is that the development server can process only one request at a time, but that is usually fine while you are stopped in an interactive debugger anyway. If you need to keep threaded behavior, use an IDE/debugger such as VS Code, PyCharm, or |
|
Hm. I'm currently having this issue again with app.run(debug=True,
threaded=False,
host="127.0.0.1",
port=5000) |
Uh oh!
There was an error while loading. Please reload this page.
This is my code example:
Accessing /status, I get:
Versions I use
Using Python 3.13.5.
Thanks for your help! I'm wondering why I'm the only one having this... Couldn't find something in the web...
All reactions