Visual Studio 2022 调试 Azure 应用服务

Visual Studio 2022 Debug Azure App Service

我关注了多篇关于如何在 vs 2022 上调试 azure 应用程序服务的文章。我了解到云资源管理器在 2022 年已被弃用,所以我 运行 进入这个 并在我附加托管部分的调试器,我不断遇到一个主要问题。

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 Remote Debugger 不在那里,我看到添加到出站规则是可选的。因此,在完成所有这些并关闭 VS 并重新打开它并尝试再次附加调试器之后,我仍然遇到与完成所有要求之前相同的错误。我什至关闭了我的防火墙只是为了测试它,但仍然收到相同的错误消息。当我尝试附加调试器时,是否遗漏了导致此错误仍然出现的某些内容?

我尝试使用带有 .Net 6.0 的 VS 2022 调试应用程序。

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

  • 当我尝试使用调试菜单中的 Attach to Process 选项进行调试时,我遇到了同样的问题。

  • 在您的任何表单中放置断点。当我使用基本应用程序时,我已经放置在 Index.cshtml.cs.

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

  • 在托管部分单击附加调试器。