Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't debug containerized Python app in WSL without DockerDesktop #3525

Closed
Wadzio opened this issue May 15, 2022 · 2 comments · Fixed by #3529
Closed

Can't debug containerized Python app in WSL without DockerDesktop #3525

Wadzio opened this issue May 15, 2022 · 2 comments · Fixed by #3529

Comments

@Wadzio
Copy link

Wadzio commented May 15, 2022

OS: Windows 10 (21H2 build: 19044.1706)
VSCode: 1.67.1
VSCode-docker: 1.22.0
WSL2 with distro: Ubuntu 20.4, kernel 5.10.16
Docker in Ubuntu distro: 20.10.12
No DockerDesktop installed on OS

Everything works perfectly when we have DockerDesktop installed on the OS (it was fixed in #2641)

When we do not have DockerDesktop, and we have Docker installed in Ubuntu distribution in WSL, then when we try to debug containerized Python app we get "Timed out waiting for launcher to connect"

At the moment the only solution I could find is to manually enter the IP bridge gateway in the debugAdapterHost

launch.json

{
  "name": "Docker: Python - General",
  "type": "docker",
  "request": "launch",
  "preLaunchTask": "docker-run: debug",
  "debugAdapterHost": "172.17.0.1", // docker inspect --format '{{(index .IPAM.Config 0).Gateway}}' 'bridge'
  "python": {
    "pathMappings": [
        {
           "localRoot": "${workspaceFolder}",
           "remoteRoot": "/app"
        }
    ],
    "projectType": "general"
  }
}

image

@bwateratmsft
Copy link
Collaborator

I think with a minor adjustment to #3522 we can fix this.

@bwateratmsft
Copy link
Collaborator

This has now been released in Docker extension version 1.23.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants