New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add easy "debug-on-exception" debugger middleware functionality (and remote debugging) #11493
base: master
Are you sure you want to change the base?
Conversation
- Adds middleware class to allow intercepting exceptions in endpoints and starting a debugger in those stack frames - Debugger is customizable by passing in a custom callable that can run debugger of choice - Default debugger if not customized is PDB - Adds support to use web-PDB by including pre made callable that can be passed in as a middleware arg
I guess this is nice-to-have. But:
Do other people have thoughts on the matter? |
Thank @Jaza appreciate the feedback. But curious to see if there is any other input/ opinions here? |
Intent:
Quicker to replicate issues, less cycles to fix
Easy remote/ docker-ized debugging
Additionally having a debugger right in the browser can make the "ergonomics" of this cycle less cumbersome.
This PR attempts to achieve the above by providing an easy way to add debug-on-exception feature to Fastapi along side with some sensible default debugger options.
Overview:
Adds middleware class to allow intercepting exceptions in endpoints and starting a debugger in those stack frames
Debugger is customizable by passing in a custom callable that can run debugger of choice
Default debugger if not customized is PDB
Adds support to use web-PDB by including pre made callable that can be passed in as a middleware arg