1

The --debug switch in Azure CLI is very useful for me.

Do we have such feature (--debug) in Azure Poweshell?

Please note that I am not asking how to debug PowerShell scripts. I am looking for a feature to trace the calls that Azure Poweshell cmdlets are making to management.azure.com without using the tools like WireShark. Azure CLI's --debug perfectly does that.

RoadRunner
  • 25,803
  • 6
  • 42
  • 75
Allan Xu
  • 7,998
  • 11
  • 51
  • 122

1 Answers1

1

You can run Azure PowerShell cmdlets in Debug mode. This is known as a common parameter, which can be used with any cmdlet.

For example, you could run Get-AzResourceGroup -Debug to trace the GET request to https://management.azure.com and all the programmer-level detail operations happening in the background to fetch the resource groups from the ARM API.

RoadRunner
  • 25,803
  • 6
  • 42
  • 75