Azure / Azure/azure-functions-powershell-worker

PSDebugger Hangs on Get-AzKeyVaultSecret

Open
#266 3 comments 0 reactions 1 assignee Claimed by @eamonoreilly View on GitHub
Dominant language
C#
Stars
215
Forks
61
Avg merge
21h 4m
Merged PRs (30d)
6

Description

Running Get-AzKeyVaultSecret will cause the debugger to hang:
```PowerShell
#
# Type Returned is Secure String
$SQLPassword = (Get-AzKeyVaultSecret -VaultName Vault -Name Name).SecretValue
Wait-Debugger
```
I do suspect this is a secure string issue (related in #259 ), however the debugger hung when trying to run the following commands:

```powershell
(Get-Command Get-AzContext -ErrorAction Ignore) -eq $null)
Get-AzContext
```

The debugger hung at: Debugger Hangs at Line: 120 -> Az.KeyVault.psm1

```powershell
$global:PSDefaultParameterValues.Add($_,
{
if ((Get-Command Get-AzContext -ErrorAction Ignore) -eq $null)
{
$context = Get-AzureRmContext
}
else
{
$context = Get-AzContext
}
if (($context -ne $null) -and $context.ExtendedProperties.ContainsKey("Default Resource Group")) {
$context.ExtendedProperties["Default Resource Group"]
}
})
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.