microsoft / DockerTools

Tools For Docker, including Visual Studio Provisioning and Publishing
Other
173 stars 26 forks source link

Docker Compose Start/Debug No Longer Works in Visual Studio 17.9.0 #418

Closed groogiam closed 4 months ago

groogiam commented 4 months ago

I updated Visual Studio today to 17.9.0 and docker compose debugging is completely broken. The containers are started on solution load but starting and debugging does not work. Output from the container tools window is below. No process is actually started in the container and the debugger is never attached.

docker ps --filter "status=running" --filter "label=com.docker.compose.service" --format {{.ID}};{{.Names}}
docker-compose  -f "C:\Users\UserName\source\repos\myprojectV2\src\DockerCompose\docker-compose.yml" -f "C:\Users\UserName\source\repos\myprojectV2\src\DockerCompose\docker-compose.override.yml" -f "C:\Users\UserName\source\repos\myprojectV2\src\DockerCompose\obj\Docker\docker-compose.vs.debug.g.yml" -f "C:\Users\UserName\source\repos\myprojectV2\src\DockerCompose\docker-compose.vs.debug.yml" -p myproject-web --ansi never up -d --no-build
 Network myproject-web_default  Creating
 Network myproject-web_default  Created
time="2024-02-15T14:15:34-05:00" level=warning msg="volume \"myproject-Postgres-Data\" already exists but was created for project \"docker_volumes-backup-extension-desktop-extension\" (expected \"myproject-web\"). Use `external: true` to use an existing volume"
 Container myproject-av  Creating
 Container myproject-redis  Creating
 Container myproject-smtp  Creating
 Container myproject-db  Creating
 Container myproject-smtp  Created
 Container myproject-db  Created
 Container myproject-redis  Created
 Container myproject.Web  Creating
 Container myproject-av  Created
 Container myproject.Web  Created
 Container myproject-db  Starting
 Container myproject-smtp  Starting
 Container myproject-av  Starting
 Container myproject-redis  Starting
 Container myproject-db  Started
 Container myproject-redis  Started
 Container myproject.Web  Starting
 Container myproject-smtp  Started
 Container myproject-av  Started
 Container myproject.Web  Started
Done!  Docker containers are ready.
========== Debugging ==========
========== Debugging ==========
dbreshears commented 4 months ago

Hi @groogiam. We tested just now on 17.9 and didn't see any issue with Compose debugging. Can you try a "Clean" and if it still reproces, can you share your build and debug logs from VS. What version of Docker Desktop are you on? Are you able to share your compose file?

groogiam commented 4 months ago

@dbreshears I've tried on Docker 27.2 and rolled back to 26.1 with the same problem. I am attempting to roll back visual studio to the previous version to see if this persists. If it does I'll try a clean install of Visual Studio.

I don't really want to share my compose files publicly but if I would be happy to share a private One Drive link with them. I would need your email address for that though.

Thanks.

dbreshears commented 4 months ago

I think the best way to share all this privately is through Developer Community. Can you open an issue here so you can provide the files and we can track. https://developercommunity.visualstudio.com/VisualStudio/report

groogiam commented 4 months ago

I did some more testing and this appears to caused by hosting my project on the a Dev Drive. I'm not sure if it is something with Dev Drive or not being on C:\ but debugging stops working when I have my code at D:\repos\MyProject.

groogiam commented 4 months ago

I created a developer community issue as well. https://developercommunity.visualstudio.com/t/Visual-Studio-1790-Breaks-Docker-Compo/10585320

NCarlsonMSFT commented 4 months ago

Closing here as this is now tracked on developer community.