microsoft / microsoft/vscode-remote-release
Unable to connect to running container
Open
@chrmarti is already working on this.
Since Sep 4, 2026.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 470
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
VS Code can't attach to container created by and running under wslc. Attaching to the container on the CLI works fine.
- VSCode Version:
1.361.1 - Local OS Version:
Windows 11 25H2 - Remote OS Version:
Ubuntu 26.04 - Remote Extension/Connection Type: Dev Containers (WSLC)
- Logs:
[623 ms] Dev Containers 0.466.0 in VS Code 1.136.1 (a44adf7f53e00964ab890f9f8758a334f1fc15bc).
[619 ms] Start: Resolving Remote
[639 ms] Setting up container: /test-modules
[1233 ms] Start: Run: wslc inspect --type container /test-modules
Notice how the name of the container is test-modules, but inspect JSON has "Name": "/test-modules", that is why the extension says that the container no longer exists when it tries to connect. I don't know where the extraneous leading / comes from but it breaks the extension.
wslc inspect --type container test-modules
[
{
"Config": {
"Cmd": [
"/bin/bash"
],
"Entrypoint": null,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"Healthcheck": null,
"Image": "ubuntu:resolute",
"Labels": {
"org.opencontainers.image.created": "2026-08-17T09:02:45.677319+00:00",
"org.opencontainers.image.description": "The Ubuntu container image maintained by Canonical\n\nUbuntu is a Debian-based Linux operating system that runs from the desktop to the cloud, to all your internet connected things.\nIt is the world's most popular operating system across public clouds and OpenStack clouds.\nIt is the number one platform for containers; from Docker to Kubernetes to LXD, Ubuntu can run your containers at scale.\nFast, secure and simple, Ubuntu powers millions of PCs worldwide.\n",
"org.opencontainers.image.title": "ubuntu",
"org.opencontainers.image.version": "26.04"
},
"StopTimeout": null,
"User": "",
"WorkingDir": ""
},
"Created": "2026-09-04T18:11:34.17873Z",
"HostConfig": {
"Memory": 0,
"NanoCpus": 0,
"NetworkMode": "bridge",
"Ulimits": []
},
"Id": "033f948436e046f3abcef44c971c35ec314c7db38ee8ef2755ae482f6fae01a8",
"Image": "sha256:af52039db3f8df8b54cd80945bdabea797445f414955027fa0bed9cd3908244b",
"Labels": {
"org.opencontainers.image.created": "2026-08-17T09:02:45.677319+00:00",
"org.opencontainers.image.description": "The Ubuntu container image maintained by Canonical\n\nUbuntu is a Debian-based Linux operating system that runs from the desktop to the cloud, to all your internet connected things.\nIt is the world's most popular operating system across public clouds and OpenStack clouds.\nIt is the number one platform for containers; from Docker to Kubernetes to LXD, Ubuntu can run your containers at scale.\nFast, secure and simple, Ubuntu powers millions of PCs worldwide.\n",
"org.opencontainers.image.title": "ubuntu",
"org.opencontainers.image.version": "26.04"
},
"Mounts": [],
"Name": "/test-modules",
"NetworkSettings": {
"Networks": {
"bridge": {
"Aliases": [],
"DriverOpts": {},
"Gateway": "172.17.0.1",
"IPAMConfig": null,
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
"Links": [],
"MacAddress": "02:42:ac:11:00:02"
}
}
},
"Ports": {},
"State": {
"ExitCode": 0,
"FinishedAt": "0001-01-01T00:00:00Z",
"Health": null,
"Running": true,
"StartedAt": "2026-09-04T18:11:43.729286Z",
"Status": "running"
}
}
]
Steps to Reproduce:
- Create a plain container
- Start the container
- Connect using Remote Explorer or
Dev Containers: Attach to Running Container. The command palette picker also has the extra/, but the Remote Explorer UI does not (yet it still fails to connect).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.