【问题标题】:How to attach visual studio 2015 debugger to previously deployed asp.net core docker container如何将 Visual Studio 2015 调试器附加到先前部署的 asp.net core docker 容器
【发布时间】:2016-08-20 17:54:44
【问题描述】:

我使用了 Visual Studio 2015 的 docker 支持扩展,效果很好。我能够从 Visual Studio 启动和调试 asp.net 核心应用程序。

我想知道是否有办法将 Visual Studio 调试器重新附加到 docker 容器?

容器已经在运行并且已经安装了 clrdbg 工具。

我尝试将 docker exec 包装在 powershell 中以运行 clrdbg 并将项目可执行文件设置为 PowerShell。我不确定这是否接近正确的方法。我只是将命令更新为正确的 containerid 并从 VS 开始调试。 powershell 启动,但我无法达到断点。

docker exec -i 89595163e6bd /clrdbg/clrdbg --interpreter=mi

Docker 版本:

 Version:      1.12.0
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   8eab29e
 Built:        Thu Jul 28 21:04:48 2016
 OS/Arch:      windows/amd64
 Experimental: true

Dotnet 版本:

1.0.0-preview2-003121

【问题讨论】:

标签: debugging docker visual-studio-2015 asp.net-core remote-debugging


【解决方案1】:

请尝试以下链接中提到的步骤。

https://github.com/dotnet/dotnet-docker/issues/162

我还尝试从其他机器复制 100 多个文件,至少该应用程序在 Docker 上运行。然而,让它与调试器一起工作。

【讨论】:

  • 不要使用答案来请求更多信息。如果您需要更多信息,请使用评论询问。此外,最好在答案中包含大部分答案,并使用链接作为进一步参考的方法。 - From review
猜你喜欢
  • 2020-03-16
  • 1970-01-01
  • 2020-06-12
  • 2022-11-10
  • 2016-09-23
  • 2019-07-05
  • 1970-01-01
  • 2017-05-04
  • 1970-01-01
相关资源
最近更新 更多