-
Notifications
You must be signed in to change notification settings - Fork 734
Description
Environment data
dotnet --info output: dotnet 6
VS Code version: 1.85
C# Extension version: 2.13.10
OmniSharp log
Steps to reproduce
- Create a new IoT Edge Solution according to the documentation https://learn.microsoft.com/en-us/azure/iot-edge/tutorial-develop-for-linux?view=iotedge-1.4&tabs=csharp&pivots=iotedge-dev-ext
- Run edge solution locally
- Try to attach to the remote process according to the documentation https://learn.microsoft.com/en-us/azure/iot-edge/debug-module-vs-code?view=iotedge-1.4&tabs=c&pivots=iotedge-dev-ext
- See error
Expected behavior
VS Code is attached to the remote process.
Actual behavior
The error appears:
Starting: "docker" exec -i DataProcessor sh -c "~/vsdbg/vsdbg --interpreter=vscode"
Error from pipe program 'docker': sh: 1: /home/moduleuser/vsdbg/vsdbg: not found
The pipe program 'docker' exited unexpectedly with code 127.
Additional context
Docker file:
FROM mcr.microsoft.com/dotnet/runtime:6.0 AS base
RUN apt-get update &&
apt-get install -y --no-install-recommends unzip procps &&
rm -rf /var/lib/apt/lists/*RUN useradd -ms /bin/bash moduleuser
USER moduleuser
RUN curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v latest -l ~/vsdbgFROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env
WORKDIR /appCOPY *.csproj ./
RUN dotnet restoreCOPY . ./
RUN dotnet publish -c Debug -o outFROM base
WORKDIR /app
COPY --from=build-env /app/out ./ENTRYPOINT ["dotnet", "DataProcessor.dll"]
Launch config:
{ "name": "DataProcessor Remote Debug (.NET Core)", "type": "coreclr", "request": "attach", "processId": "${command:pickRemoteProcess}", "pipeTransport": { "pipeProgram": "docker", "pipeArgs": [ "exec", "-i", "DataProcessor", "sh", "-c" ], "debuggerPath": "~/vsdbg/vsdbg", "pipeCwd": "${workspaceFolder}", "quoteArgs": true }, "sourceFileMap": { "/app": "${workspaceFolder}/modules/DataProcessor" }, "justMyCode": true }
