Debug for azure sdk (How to show the relevant REST API)

306 Views Asked by At

I'm using Azure JS SDK for interacting with Postgres in Azure (@azure/arm-postgresql, @azure/identity, @azure/functions ...). I'd like to get the underlying REST Api for debugging purpose.

For example I'd like to know during the runtime the corresponding Rest API orders :

 const postgresCli = new PostgreSQLManagementClient(new DefaultAzureCredential(), subscriptionId);
 const fwRules = postgresCli.firewallRules.listByServer(azResourceGroup, azPostgresServerName);

Do you know if that's possible ?

Regards,

Blured.

1

There are 1 best solutions below

0
On

You can turn on more detailed logging by following the instructions at https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/postgresql/arm-postgresql/README.md#logging

Another quick way is to set environment variable DEBUG=azure*