【问题标题】:.NET Core CLR debugger VSDBG halts the application when attaching to a remote process in a Windows Docker container.NET Core CLR 调试器 VSDBG 在附加到 Windows Docker 容器中的远程进程时暂停应用程序
【发布时间】:2017-12-18 23:54:23
【问题描述】:

我有一个在 Windows Docker 容器中运行的 .NET Core 应用程序,我想将 Visual Studio 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"

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

【问题讨论】:

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


    【解决方案1】:
    猜你喜欢
    • 2017-12-26
    • 2016-01-27
    • 2012-12-20
    • 2020-02-20
    • 2018-02-12
    • 2017-04-23
    • 2016-10-30
    • 2019-10-24
    • 2016-04-06
    相关资源
    最近更新 更多