gpt4 book ai didi

azure - Cloud Explorer 相当于调试 VS2022 用于上传到存储的压缩发布代码?

转载 作者:行者123 更新时间:2023-12-03 06:56:39 25 4
gpt4 key购买 nike

Cloud explorer in VS2022 has been removed.我发布并压缩代码,并将其上传到 Azure 的私有(private) Azure 存储帐户中,然后运行 ​​Function Apps(从包文件运行)。如何像以前使用云资源管理器一样进行远程调试?

Publish does not offer the Hosting option.所以Stackoverflow answers别为我工作。此外,我已将函数应用程序连接到连接的服务,然后单击“附加调试器”,但它在执行时不会停止代码,即用于调试的单步调试代码不像 Cloud Explorer 那样工作。

enter image description here

enter image description here

最佳答案

部署后检查一些设置。

  1. 检查 Azure 门户上的远程调试是否已打开,并选择远程 Visual Studio 版本(如果未选择)。

enter image description here

  • 转到 Visual Studio 和转到工具,然后选择获取工具和功能。您只需要进行 Azure 开发即可。如果未安装此存储模拟器,则自动安装后,请访问 Microsoft 站点并安装它。 enter image description here

  • 如果已安装,您可以使用此命令运行它。 AzureStorageEmulator.exe 启动。有关 Azure Storage Emulator for Development and testing 的更多信息通过 Microsoft 文档

  • 将配置从发布更改为调试。 enter image description here

  • enter image description here

  • 在 cmd 下启动 Azure 存储模拟器。如果您的系统中未安装 click here to Download来自 Microsoft 网站。
  • C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>AzureStorageEmulator.exe
    Windows Azure Storage Emulator 5.10.0.0 command line tool
    Error: Expected command as first argument.
    Usage:
    AzureStorageEmulator.exe init : Initialize the emulator database and configuration.
    AzureStorageEmulator.exe start : Start the emulator.
    AzureStorageEmulator.exe stop : Stop the emulator.
    AzureStorageEmulator.exe status : Get current emulator status.
    AzureStorageEmulator.exe clear : Delete all data in the emulator.
    AzureStorageEmulator.exe help [command] : Show general or command-specific help.

    See the following URL for more command line help: http://go.microsoft.com/fwlink/?LinkId=392235

    C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>AzureStorageEmulator.exe start
    Windows Azure Storage Emulator 5.10.0.0 command line tool
    Autodetect requested. Autodetecting SQL Instance to use.
    Looking for a LocalDB Installation.
    Probing SQL Instance: '(localdb)\MSSQLLocalDB'.
    Found a LocalDB Installation.
    Probing SQL Instance: '(localdb)\MSSQLLocalDB'.
    Found SQL Instance (localdb)\MSSQLLocalDB.
    Creating database AzureStorageEmulatorDb510 on SQL instance '(localdb)\MSSQLLocalDB'.

    Granting database access to user FAREAST\v-pusharma.
    Database access for user FAREAST\v-pusharma was granted.

    Initialization successful. The storage emulator is now ready for use.
    Error: Unable to start the storage emulator.

    C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>netstat -p tcp -ano | findstr :10000
    TCP 127.0.0.1:10000 0.0.0.0:0 LISTENING 9764

    C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>taskkill /F /PID 9764
    SUCCESS: The process with PID 9764 has been terminated.

    C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>AzureStorageEmulator.exe start
    Windows Azure Storage Emulator 5.10.0.0 command line tool
    The storage emulator was successfully started.

    C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>
  • 检查Storage Emulator show是否已连接。 enter image description here

  • 然后在visiual studio上添加断点并运行函数。它正在工作, enter image description here

  • 使用此选项远程附加调试。因为在 Visual Studio 2022 中不显示 Cloud Explorer。 enter image description here

    关于azure - Cloud Explorer 相当于调试 VS2022 用于上传到存储的压缩发布代码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72894799/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com