I have a PS Cmdlet in C# - its ProcessRecord function looks like this:
var azureServiceTokenProvider = new AzureServiceTokenProvider(); var keyClient = new KeyVaultClient( new KeyVaultClient.AuthenticationCallback(azureServiceTokenProvider.KeyVaultTokenCallback)); var cert = await keyClient.GetCertificateAsync(keyVaultCertUri);
My problem is when I call any KeyVaultClient API from within my Cmdlet, VS simply ends the debugging session. There's no useful output in the Debug window; no exception is thrown; nada. The debugging session just suddenly ends.
How can I debug what's going on so I can make this call successfully?