parsec-cloud icon indicating copy to clipboard operation
parsec-cloud copied to clipboard

How to enabled FastAPI debug mode?

Open FirelightFlagboy opened this issue 1 year ago • 1 comments

We rely on the field FastAPI::debug to add the precise server version in the Header server:

https://github.com/Scille/parsec-cloud/blob/5ad66b46209de99b975197059c40386a5097c6d7/server/parsec/asgi/init.py#L89-L95

But the value app.debug seems to always be false (only true when run as the testbed).

I would have expected that when I pass the flag --debug that app.debug is set to true (actually we set backend_config.debug = true)

FirelightFlagboy avatar Oct 07 '24 12:10 FirelightFlagboy

After some discussion with @touilleMan, we want to use backend_config.debug instead of app.debug

~We should also add a comment about why we also set app.debug = False (on uncatched exception it return an html page with the exception formatted)~

app.debug should be set to backend_config.debug

FirelightFlagboy avatar Oct 16 '24 12:10 FirelightFlagboy