Visual Studio Code - how to remote debug python code in a Docker Container
问题 Iam trying to remote dubug python in VSC: It is main.py file: print('Hello, World') debug.py: import ptvsd ptvsd.enable_attach('my_secret', address=('0.0.0.0', 7102)) ptvsd.wait_for_attach() Dockerfile: FROM python:3.6-slim EXPOSE 7102 RUN pip install ptvsd WORKDIR /app COPY . . CMD ["python", "debug.py"] and it is launch.json file: { "version": "0.2.0", "configurations": [ { "name": "Attach (Remote Debug)", "type": "python", "request": "attach", "localRoot": "${workspaceRoot}", "remoteRoot":