azure - Visual Studio 2022 调试 Azure 应用服务

标签 azure azure-web-app-service remote-debugging visual-studio-2022

我正在阅读多篇关于如何在 vs 2022 上调试 azure 应用程序服务的文章。我了解到 Cloud Explorer 已在 2022 年被弃用,所以我遇到了这个 similar question在我将调试器附加到托管部分后,我不断地遇到一个主要问题。

The Visual Studio 2022 Remote Debugger (MSVSMON.EXE) does not appear to be running on the remote computer. This may be because a firewall is preventing communication to the remote computer. Please see Help for assistance on configuring remote debugging

我转到 Windows Defender 防火墙 -> 允许应用或功能通过 Windows Defender 防火墙,并确保选中了 Visual Studio 2022 远程调试器。我什至转到了 VS 的安装目录,然后转到 Common7/IDE/RemoteDebugger/x64/msvsmon.exe 并单击它来启动它,其中指出

Msvsmon started a new server named 'Home'. Waiting for new connections.

然后,我搜索“防火墙和网络保护”->“高级设置”->“入站规则”,并确保 Visual Studio 2022 远程调试器上有绿色复选标记。我检查了出站规则,Visual Studio 2022 远程调试器不在那里,我发现添加到出站规则是可选的。因此,在完成所有这些操作并关闭 VS 并重新打开它并尝试再次附加调试器之后,我仍然遇到在满足所有要求之前遇到的相同错误。我什至关闭了防火墙来测试它,但仍然收到相同的错误消息。当我尝试附加调试器时,是否缺少某些内容导致此错误仍然出现?

最佳答案

我尝试使用 VS 2022 和 .Net 6.0 来调试应用程序。

The Visual Studio 2022 Remote Debugger (MSVSMON.EXE) does not appear to be running on the remote computer. This may be because a firewall is preventing communication to the remote computer. Please see Help for assistance on configuring remote debugging

  • 当我尝试使用“调试”菜单中的附加到进程选项进行调试时,我遇到了同样的问题。 enter image description here

  • 在任何表单中放置断点。由于我使用的是基本应用程序,因此我将其放置在 Index.cshtml.cs 中。

  • 在“设置”部分中将配置更改为调试,并将应用程序发布到 Azure。

  • 在“托管”部分中,单击“附加调试器”。 enter image description here

enter image description here

关于azure - Visual Studio 2022 调试 Azure 应用服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70713964/

相关文章:

azure - 如何在Azure功能应用程序中添加授权以阻止未经授权的访问

json - 从azure逻辑应用程序中的JSON对象文件返回特定属性(文本)

remote-debugging - 如何让 `callFrameID` 传递给 `Debugger.evaluateOnCallFrame` ?

azure - 使用 Azure 函数绑定(bind)返回容器中的 Blob 列表

powershell - 使用 Azure Powershell 获取角色即时状态

postgresql - 多云 PostgreSQL 复制

Azure 混合连接状态显示 "Not Connected"

.net - 如何调试在云中运行的Azure Web角色?

go - 如何使用Golang在远程机器上调试Go代码?

java - 如何使用 java sdk 将文件从 azure adls gen 1 下载到本地?