Closed ju1es closed 10 months ago
I'll check out the branch and play around with it a bit. So basically the hot reloading feature in Flask interferes with the VS Code debugger?
@erikguntner exactly yep
@erikguntner updating only the readme as I merged the changes to toggle the 'use_reloader' config in a separate pr
@ju1es @erikguntner When using an external debugger, the Flask external debugging documentation suggests to disable the built-in debugger and reloader:
app.run(debug=True, use_debugger=False, use_reloader=False)
Keep in mind that this app.run()
function is only used for local development: connexion API doc and flask API doc
The Flask run API documentation tells us: "It is not recommended to use this function for development with automatic reloading as this is badly supported. Instead you should be using the flask command line script’s run support."
However, in our case, we use connexion
as our application framework. Connexion comes with its own command line interface (CLI), BUT it works by calling the Flask.run()
function and it does not provide a way to disable the built-in debugger and reloader (connexion cli code). Therefore, our default configs for reloader
can be set to false and have a comment about why the reloader
config should stay False
.
@paulespinosa ah! thank you for digging into that. I'm a little confused though. When we debug, we set our breakpoints, set flask's reloader and debugger to false, then start the api via the following command?
python3 -m openapi_server
That looks right.
On July 16, 2023 3:52:09 AM GMT+07:00, ju1es @.***> wrote:
@paulespinosa ah! thank you for digging into that. I'm a little confused though. When we debug, we set our breakpoints, set flask's reloader and debugger to false, then start the api via the following command?
python3 -m openapi_server
-- Reply to this email directly or view it on GitHub: https://github.com/hackforla/HomeUniteUs/pull/521#issuecomment-1636884437 You are receiving this because you were mentioned.
Message ID: @.***>
Problem
Unable to step through/debug requests to api.
Solution
Resources