将VSDB.exe与代码clr远程调试器连接到VSCode中的Windows docker容器中的dotnet运行进程时,应用程序进入调试模式并检索线程列表并显示调试输出,但是当我点击时断点,VS代码挂起并停止调试关闭docker容器。使用相同的调试器在本地工作正常。这是Docker或VSCode中的问题吗?
Docker信息
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
我在
下面包含了本地调试和远程调试的调试器输出日志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
运行图片:
docker run -d idsrv4-mvc-dev-src dotnet run http://*:60720
远程调试任务
{
"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"
},
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"
}
}
远程调试日志 https://pastebin.com/kxV7MMRA
从本地调试记录 https://pastebin.com/7gX6tZQ6