Pycharm Remote -Debugger ist beim Warten auf die Verbindung, wenn Sie von Pycharm `Cloud Code: Kubernetes' -KonfiguratioPython

Python-Programme
Anonymous
 Pycharm Remote -Debugger ist beim Warten auf die Verbindung, wenn Sie von Pycharm `Cloud Code: Kubernetes' -Konfiguratio

Post by Anonymous »

Ich versuche im Debug -Modus zu laufen, ein Python -Fastapi -Anwendung, der in einem Container mit dem Pycharm -Cloud -Code -Plugin ausgeführt wird, aber ich kann keine Haltepunkte zum Laufen bringen. tiangolo/uvicorn-gunicorn-fastapi:python3.11
[*]docker-desktop local deployment via Cloud Code: Kubernetes run configuration

What happens:
  • The container deploys erfolgreich < /li>
    Portweiterungen (sowohl für App- als auch für Debug -Ports) < /li>
    Die Anwendung wird normal ausgeführt. src = "https://i.sstatic.net/wxmu6gow.png"/>
Protokolle zeigen diese Warnung (nicht sicher, wenn relevant):

Code: Select all

[elon] WARN[0000] not a python launcher: unable to determine python version from "/usr/bin/env": exit status 125
< /code>
 Aus Containerprüfung: < /h3>
$ kubectl exec -it pod-name -- ps -ef
root         1     0  0 13:39 pts/0    00:00:00 /dbg/python/launcher --mode pydevd --port 5678 -- /start-reload.sh
root        13     1  0 13:39 pts/0    00:00:01 /usr/local/bin/python3.11 /usr/local/bin/uvicorn --reload --host 0.0.0.0 --port 8080 --log-level info app.web:app
< /code>
 Der Container kann meinen Host -Computer erfolgreich erreichen: < /h3>
kubectl exec -it pod-name -- wget -O- http://host.docker.internal:63341
HTTP request sent, awaiting response... 404 Not Found
< /code>
 Die Portweiterleitung ist aktiv < /h3>
Port forwarding pod/pod-name in namespace default, remote port 5678 -> http://127.0.0.1:5678
Umgebungsdetails:
  • Pycharm Professional 2024.3.2
  • Cloud-Code-Plugin-Version 24.11.1-233-API-Version-223
    Docker Desktop version 4.38.0 (181591)
Image

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post