vscode debug python containers running kubernetes via attachment
- 1 minutes read - 86 wordspython-guestbook at https://github.com/GoogleCloudPlatform/cloud-code-samples is used to practice debug python containers in kubernetes.
Google cloud python code vscode plugin 1.7.0 failed to run python on kubernetes or there is no obvious way to do that as depicted in the below pic.
Steps to make it:
-
run
skaffold debug
-
Import ptvsd in the python file to debug, add breakout() before the line to debug
-
attach to the python pod
-
Access the page which will trigger the breakpoint from browser. The actual breakpoint GUI is as the below picture.