You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*[PowerShell extension for Visual Studio Code](/powershell/scripting/components/vscode/using-vscode)
97
+
*[Azure Functions extension for Visual Studio Code](functions-create-first-function-vs-code.md)
98
+
*[PowerShell Core 6.2 or higher](/powershell/scripting/install/installing-powershell#powershell-core)
98
99
99
-
After installing the PowerShell and Azure Functions extensions, load an existing function app project. You can also [create a Functions project](functions-create-first-function-vs-code.md).
100
+
After installing these dependencies, load an existing PowerShell Functions project, or [create your first PowerShell Functions project](functions-create-first-function-powershell.md).
100
101
101
102
>[!NOTE]
102
103
> Should your project not have the needed configuration files, you are prompted to add them.
103
104
105
+
### Set the PowerShell version
106
+
107
+
PowerShell Core installs side by side with Windows PowerShell. Set PowerShell Core as the PowerShell version to use with the PowerShell extension for Visual Studio Code.
108
+
109
+
1. Press F1 to display the command pallet, then search for `Session`.
110
+
111
+
1. Choose **PowerShell: Show Session Menu**.
112
+
113
+
1. If your **Current session** isn't **PowerShell Core 6**, choose **Switch to: PowerShell Core 6**.
114
+
115
+
When you have a PowerShell file open, you see the version displayed in green at the bottom right of the window. Selecting this text also displays the session menu. To learn more, see the [Choosing a version of PowerShell to use with the extension](/powershell/scripting/components/vscode/using-vscode#choosing-a-version-of-powershell-to-use-with-the-extension).
116
+
104
117
### Start the function app
105
118
106
119
Verify that `Wait-Debugger` is set in the function where you want to attach the debugger. With `Wait-Debugger` added, you can debug your function app using Visual Studio Code.
@@ -136,7 +149,7 @@ After you continue and fully invoke your script, you'll notice that:
136
149
* The PowerShell console that did the `Invoke-RestMethod` has returned a result
137
150
* The PowerShell Integrated Console in Visual Studio Code is waiting for a script to be executed
138
151
139
-
Subsequent times when you invoke the same function, the debugger in PowerShell extension breaks right after the `Wait-Debugger`.
152
+
Later when you invoke the same function, the debugger in PowerShell extension breaks right after the `Wait-Debugger`.
0 commit comments