When attaching the VSDB.exe vs code clr remote debugger to a dotnet running process in a windows docker container in VSCode, the applications goes into debug mode and retrieves a list of threads and shows the debug output, but when I hit a breakpoint, VS Code hangs and stopping debugging shuts down the docker container. Using the same debugger works fine locally. Is this a problem in Docker or VSCode?
Docker info
Server Version: 17.06.0-ce
Storage Driver: windowsfilter
Windows:
Logging Driver: json-file
Plugins:
Volume: local
Network: l2bridge l2tunnel nat null overlay transparent
Log: awslogs etwlogs fluentd json-file logentries splunk syslog
Swarm: inactive
Default Isolation: hyperv
Kernel Version: 10.0 15063 (15063.0.amd64fre.rs2_release.170317-1834)
Operating System: Windows 10 Enterprise N
OSType: windows
Architecture: x86_64
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: -1
Goroutines: 39
System Time: 2017-07-19T12:13:06.0721766-07:00
EventsListeners: 0
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
I've included debugger output logs from local debug and remote debug below
Dockerfile
FROM microsoft/nanoserver
FROM microsoft/aspnetcore-build
COPY ./tools/coreclr-debug-win7-x64 ./debug/coreclr-debug
COPY ./Clients/Client.Web.Identity.Client.MVC ./Clients/Client.Web.Identity.Client.MVC
WORKDIR ./Clients/Client.Web.Identity.Client.MVC
RUN dotnet restore Client.MVC.csproj
RUN dotnet build Client.MVC.csproj
Running the image:
docker run -d idsrv4-mvc-dev-src dotnet run http://*:60720
Remote debug task
{
"name": ".NET Core Remote Attach",
"type": "coreclr",
"request": "attach",
"pipeTransport": {
"pipeProgram": "powershell",
"pipeArgs": ["docker exec -i heuristic_goodall" ],
"pipeCwd": "${workspaceRoot}",
"debuggerPath": "c:\\debug\\coreclr-debug\\vsdbg.exe"
},
"processId": "1816"
},
Local debug task in Launch.json
{
"name": ".NET Core Local Attach Using Explicit Debugger",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}",
"pipeTransport": {
"pipeProgram": "powershell",
"pipeArgs": [],
"pipeCwd": "${workspaceRoot}",
"debuggerPath": "C:\\tools\\coreclr-debug-win7-x64\\vsdbg.exe"
}
}
Logs from debugging remotely https://pastebin.com/kxV7MMRA
Logs from debugging locally https://pastebin.com/7gX6tZQ6