New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to set breakpoints in PowerShell function #2204
Comments
Dupe of #1661. At the moment, you have to use |
Based on #1661, I'm not sure this is a dupe. What you can't see in the recordings is that there is a All in all, with odd debugging directives required in the code, stopping where it isn't supposed to, not stopping where it is, lousy doc/examples and just generally being hard to use you could label PowerShell function local debugging a hot mess, IMHO. |
Like this? #1660
I 100% agree. That's why it's the only language labeled "Preview" when creating a project through our extension: Unfortunately, most of the problems stem from PowerShell itself, so we had very little control over on the VS Code side. They are supposed to be fixed in PowerShell 7, which Azure Functions should officially support soon. |
|
I am unable to set breakpoints in a PowerShell function using VS Code with the Azure Functions extension. Debugging the same function script in a console debugging session works fine.
The machine environment is:
Linked below are two animated gifs showing the same script on the same machine in debug mode. In both cases, the attempt is to set a breakpoint on line 19 of the function script and when the debugger stops inspect a variable named
$subGuid
As you can see in the console session, this works.
However, in the VS Code debug session, the script first stops at the "wrong" place. This is described in the doc which then says you can set the proper breakpoints.
In my case, it doesn't matter if the breakpoints are set before attaching the debugger or after the first pause, continuing the debugging session in VS Code does not stop at the breakpoints set. The script does run to completion but it produces no console output on any pwsh stream (I am using 6 -- Information).
Here's a link the to successful console debugging session.
And here's a link to the unsuccessful console debugging session
The text was updated successfully, but these errors were encountered: