.Net Core Clr调试器VSDBG在Windows Docker容器中附加到远程进程时暂停应用程序

时间:2017-07-14 02:08:02

标签: .net debugging docker visual-studio-code .net-core

我有一个.net核心应用程序在Windows Docker容器中运行,我想将VS Code附加到。当我附加到远程进程时,似乎进程冻结,如果我断开调试器,容器将关闭而没有任何错误。

launch.json

    {
        "name": ".NET Core Remote Attach",
        "type": "coreclr",
        "request": "attach",
        "pipeTransport": {
            "pipeProgram": "powershell",
            "pipeArgs": ["docker exec -i --privileged amazing_johnson" ],
            "pipeCwd": "${workspaceRoot}",
            "debuggerPath": "c:\\coreclr-debug\\vsdbg.exe"
        },
        "processId": "1736"
    },

调试输出控制台中的结果:

Starting: "powershell" "docker exec -i --privileged amazing_johnson" "c:\coreclr-debug\vsdbg.exe --interpreter=vscode"

将调试器附加到远程进程后,当我尝试访问该站点时,它只是挂起,VSCode列出了线程并在终端中显示了一些JSON但没有任何反应。断开连接会关闭容器。为什么会这样?

1 个答案:

答案 0 :(得分:0)

可能与此GitHub问题有关:https://github.com/Microsoft/vscode/issues/31070