Reputation: 141442
We followed these instructions to debug a PowerShell Azure Function in VS Code. This is the error we experience.
Internal Error - System.Management.Automation.PSInvalidOperationException: The pipeline was not run because a pipeline is already running. Pipelines cannot be run concurrently.
The GitHub issues indicate that this is an open issue that has not been resolved. Here is a starting place for the issues and comments about the problem: https://github.com/microsoft/vscode-azurefunctions/issues/2776
Does that mean that debugging Azure PowerShell Functions with VS Code is currently broken? If not, what is the workaround to make the debugging work in VS Code?
Wait-Debugger
immediately after params
.Get-PSHostProcessInfo
locally to ensure there is no dotnet
process.{
"name": "Attach to PowerShell Functions",
"type": "PowerShell",
"request": "attach",
"customPipeName": "AzureFunctionsPSWorker",
"runspaceId": 1,
"preLaunchTask": "func: host start"
}
The error then appears.
Upvotes: 0
Views: 638
Reputation: 4883
I tried to reproduce the issue but i could not get any pipeline error in Azure PowerShell function
.
I have created a PowerShell function
in vs code and deploy it to Azure after successfully test locally .
PowerShell .
After deploying stop the function app in Portal and trying to debug in my local as mentioned in the MS DOC
When using PowerShell 7, we don't need to add the Wait-Debugger
call in our code. After that we can refresh and debug .
Note: Please make sure to use PowerShell v5 or v7 .
Upvotes: 1