Skip to content

Fail to run 'Docker .Net Core Attach (Preview)' configuration #1996

@v-ruizh

Description

@v-ruizh

OS: Windows
Build Version: 20200518.16
.NET Core SDK: 3.1.202

Repro Steps:

  1. Create a .NET Core MVC project by "dotnet new mvc --no-https".
  2. Open the project in VS Code --> Prompt to add the required assets --> Yes
  3. F1 --> Type and select "Docker: Add Docker Files to Workspace" --> ASP.NET Core --> Linux --> Include optional Docker Compose files.
  4. Right click the docker-compose.yml --> Select "Compose Up".
  5. Open launch.json and click 'Add Configration…', and choose 'Docker .NET Core Attach (Preview)'.
  6. Run the above configuration, select the running container from step4 and click yes to allow installing vsdbg on the container.

Expect:
Run the configuration successfully without any error.

Actual:
An error occurs "The pipe program 'docker' exited unexpectedly with code 126".
image

Debug Console:
Starting: "docker" exec -i mvc_mvc_1 \remote_debugger\vsdbg --interpreter=vscode
OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused "exec: "\\remote_debugger\\vsdbg": executable file not found in $PATH": unknown

Docker output:
Acquiring the latest .NET Core debugger...

Executing: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NonInteractive -NoProfile -WindowStyle Hidden -ExecutionPolicy RemoteSigned -File "C:\Users\AzureTest.vsdbg\GetVsDbg.ps1" -Version latest -RuntimeID linux-x64 -InstallPath "C:\Users\AzureTest.vsdbg\linux-x64\latest" <
Info: Using vsdbg version '16.6.20415.1'
Info: Using Runtime ID 'linux-x64'
Info: Successfully installed vsdbg at 'C:\Users\AzureTest.vsdbg\linux-x64\latest'
Debugger acquired.
Acquiring the latest .NET Core debugger...
Executing: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NonInteractive -NoProfile -WindowStyle Hidden -ExecutionPolicy RemoteSigned -File "C:\Users\AzureTest.vsdbg\GetVsDbg.ps1" -Version latest -RuntimeID linux-musl-x64 -InstallPath "C:\Users\AzureTest.vsdbg\linux-musl-x64\latest" <
Info: Using vsdbg version '16.6.20415.1'
Info: Using Runtime ID 'linux-musl-x64'
Info: Successfully installed vsdbg at 'C:\Users\AzureTest.vsdbg\linux-musl-x64\latest'
Debugger acquired.
Copying the .NET Core debugger to the container...
Debugger copied

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions