I am developing in FastAPI + uvicorn. When using skaffold dev with file sync mode, I enable the uvicorn hot reloader. This works as intended. When switching to skaffold debug, I have to disable the uvicorn reloader in order for breakpoints to hit.
In order to work around this, I have to modify my Dockerfile whenever I want to use skaffold debug. I think I can also move the uvicorn options to main.py and only set reload=True when not running under a debugger.
FWIW, when PyCharm invokes pydevd directly, it sets the --multiprocess argument and uvicorn's reload works. Here is PyCharm's Python Debug:
I am developing in FastAPI + uvicorn. When using skaffold dev with file sync mode, I enable the uvicorn hot reloader. This works as intended. When switching to skaffold debug, I have to disable the uvicorn reloader in order for breakpoints to hit.
In order to work around this, I have to modify my Dockerfile whenever I want to use skaffold debug. I think I can also move the uvicorn options to main.py and only set reload=True when not running under a debugger.
FWIW, when PyCharm invokes pydevd directly, it sets the
--multiprocess
argument and uvicorn's reload works. Here is PyCharm's Python Debug:Expected behavior
Breakpoints should hit in PyCharm as documented.
Actual behavior
Breakpoint never hits. Manually pausing the debugger breaks in the watchfiles module, main.py.
Information
Steps to reproduce the behavior
See README in https://github.com/usrbinsam/skaffold-debug-issue