uvicorn icon indicating copy to clipboard operation
uvicorn copied to clipboard

Phase out `debug` in favour of `reload`

Open lovelydinosaur opened this issue 6 years ago • 0 comments

Really we ought to phase out the usage of --debug/debug=True, in favour of...

  • --reload/reload=True (A server-level concern. Reload the server on code changes.)
  • app = Starlette(debug=True) (An application level concern. Issue nice HTML tracebacks for the "500 Server Error" case.)

Note that the Starlette package has a standalone ServerErrorMiddleware that you can use in isolation if you want just use debug tracebacks together with some custom ASGI app.

lovelydinosaur avatar Nov 09 '19 12:11 lovelydinosaur