microsoft / vscode-docker

Docker Extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker
Other
1.18k stars 508 forks source link

The remote debugging auto-disconnects immediately when debugging the python projects with "Python Debugger: Remote Attach" configuration #4244

Open v-chenzha opened 4 months ago

v-chenzha commented 4 months ago

OS: All Build Version: 20240213.3

Repro Steps:

  1. Open a python project django_project.zip in VS Code.
  2. F1 -> Docker: Add Docker Files to Workspace -> Python: Django -> Include docker compose files.
  3. Right click .debug.yml file -> Compose Up.
  4. Open the launch.json file -> Add a new "Python Debugger: Remote Attach" configuration.
  5. Navigate to "Run and Debug" view -> Select "Python Debugger: Remote Attach" -> F5.
  6. Check whether succeeds to remote debug the python project.

Expect: Succeed to remote debug the python project.

Actual: The remote debugging auto-disconnects immediately.

More Info:

  1. This issue doesn't reproduce after install Python extension v2024.0.0.
  2. This issue also reproduces for Flask project.
bwateratmsft commented 4 months ago

I'm unable to reproduce with Python extension version 2024.0.1 and Docker extension version 1.29.0. I'll try the latest build of the Docker extension.