Search code examples
docker-composevisual-studio-2019

VS2019 Docker Launch Settings Missing "Start Debugging" action


VS2019 Professional is missing the "Start Debugging" action item which is preventing me from debugging within my docker container.

enter image description here

I have created a launchSettings.json file to explicitly set the StartDebugging action, but still it is omitted from the profile and the debugger does not get attached when attempting to run in debug mode.

{
  "profiles": {
    "Docker Compose": {
      "commandName": "DockerCompose",
      "serviceActions": {
        "data": "StartDebugging",
        "api": "StartDebugging",
        "graphql": "StartDebugging",
        "kafka": "StartWithoutDebugging"
      },
      "commandVersion": "1.0"
    }
  }
}

enter image description here

Another member on the team has the same IDE version as I do, but has no issues having the debugger attached when running in debug mode. We have compared our VS2019 installations and confirmed that we have same workloads installed as well, yet his has the option.

enter image description here

Why would the "Start Debugging" action be missing and how do I bring it back?


Solution

  • I was having the same problem and saw this thread: docker compose doesn't work debugging. The workaround worked for me: disable Docker-Compose V2 support by running docker-compose disable-v2 and then restart Docker Desktop. This is apparently caused by the recent change in docker compose v2 behavior; see Output of "docker compose config" does not contain full path to context