Trouble with FastAPI, TestClient, and the debugger
I am working on a small-ish FastAPI
application, and our tests are written using starlette.TestClient
. This works well enough, but when I want to debug one of our test failures, I do the obvious – drop a breakpoint in the PyCharm debugger inside the FastAPI
code; however, I cannot then get PyCharm to respect the breakpoint. Obviously, breakpoints inside the test code are respected; but those in the body of the application are not.
This seems like something I should be able to do. Am I missing something obvious? Calling the endpoints without running the debugger does not show the same errors, so.
Please sign in to leave a comment.
oh I figured it out, hahaha.