Sergio Solorzano
Sergio Solorzano

Reputation: 665

Cloud Explorer Equivalent Debug VS2022 for zipped published code uploaded to storage?

Cloud explorer in VS2022 has been removed. I publish & zip the code and upload it to Azure in a private azure storage account that then runs Function Apps (running from a package file). How can I debug remotely like I used to do with clould explorer?

Publish does not offer the Hosting option. so the Stackoverflow answers don't work for me. Also I have connected the Function App to Connected Services and I click on Attach debuger but it does not stop the code when executed, i.e. step-in code to debug doesn't work like Cloud Explorer did.

enter image description here

enter image description here

Upvotes: 0

Views: 1021

Answers (1)

Mohit Ganorkar
Mohit Ganorkar

Reputation: 2078

After deployment checks some settings.

  1. Check Remote debugging is ON on azure portal and Select the Remote Visual Studio version, if not selected.

enter image description here

  1. Go to visual studio and go-to tool and select get tool and features. You just need to take Azure development. after this Storage Emulator is automatically installed if not installed go to the Microsoft site and install this. enter image description here

  2. If installed you can run it by using this command. AzureStorageEmulator.exe start. More information about Azure Storage Emulator for Development and testing by Microsoft Document on

  3. Change Configuration from Release to Debug. enter image description here

enter image description here

  1. Start Azure Storage Emulator below cmds. if not installed in your system click here to Download from the Microsoft site.
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>
  1. Check whether Storage Emulator show is connected or not. enter image description here

  2. Then add break point on visiual studio and run function . it's working, enter image description here

Using this option to attach debug remotely. because in visual studio 2022 not show Cloud Explorer. enter image description here

Upvotes: 1

Related Questions