Open yan-hic opened 6 months ago
Thanks for the report @yan-hic! @briandealwis Do we have any suggestions here Brian?
@yan-hic you seen seem to be referencing an example? I'm not sure where this Procfile
comes from? Including your logs would be helpful: there are a number of layers involved in enabling debugging (particularly for Python) both on the host PC and the remote cluster, and errors or warnings are emitted during the processing.
Debugging works with gunicorn, and it is used in several of the examples on the skaffold debug
page. We don't support unwrapping exec
-- trying to parse shell script seemed a recipe for disaster -- though perhaps exec
could be worth supporting (I think the relevant code would be here).
Debugging automatically picks up the debugpy
through special support images that are made available at run time: the user doesn't need to add debugpy
to their requirements.txt
. There's some documentation on the skaffold debug
doc page.
cc: @renzodavid9 and @ericzzzzzzz from the Skaffold team
When using PyCharm to debug,
requirements.txt
has unknown dependency ondebugpy
- andrequests
is not used either. Likewise,Procfile
starts VS Studio debugger - not used with IntelliJOn the latter, instead of
Procfile
, why not stay consistent with https://cloud.google.com/run/docs/tips/python#optimize_gunicorn and use a WSGI in Dockerfile CMD since the goal is to deploy to CR eventually. Problem: debugging does not work with gunicorn withFailed to start Cloud Run dev session
For debugging locally, one needs to switch from
CMD gunicorn --preload --bind :8080 --workers 2 --threads 8 --timeout 0 app:app
toENTRYPOINT ["python", "app.py"]
Not ideal for change control.