THIS DOC IS NOW HOSTED ON DOCS.MICROSOFT.COM.
PLEASE REFER TO THE DOC THERE FOR FUTURE REFERENCE AS ANY CHANGES WILL BE MADE TO THAT DOC.
While the PowerShell extension for VSCode does not seek complete feature parity with the PowerShell ISE, there are features in place to make the VSCode experience more natural for users of the ISE.
This document tries to list settings you can configure in VSCode to make the user experience a bit more familiar compared to the ISE.
Function | ISE Binding | VSCode Binding |
---|---|---|
Interrupt and break debugger | Ctrl+B | F6 |
Execute current line/highlighted text | F8 | F8 |
List available snippets | Ctrl+J | Ctrl+Alt+J |
You can configure your own keybindings in VSCode as well.
To enable more ISE-like tab completion, add this setting:
"editor.tabCompletion": "on"
This is a setting added directly to VSCode (rather than in the extension), so its behavior is determined by VSCode directly and cannot be changed by the extension.
To keep the focus in the editor when you execute with F8:
"powershell.integratedConsole.focusConsoleOnExecute": false
The default is true
for accessibility purposes.
To stop the integrated console on startup, set:
"powershell.integratedConsole.showOnStartup": false
Note: The background PowerShell process will still start, since that provides intellisense, script analysis, symbol navigation, etc. But the console will not be shown.
To make new/untitled files register as PowerShell by default:
"files.defaultLanguage": "powershell"
There are a number of ISE themes available for VSCode to make the editor look much more like the ISE.
In the Command Palette
type theme
to get Preferences: Color Theme
and press Enter.
In the drop down list, select PowerShell ISE
.
You can set this in the settings with:
"workbench.colorTheme": "PowerShell ISE"
Thanks to the work of @corbob, the PowerShell extension has the beginnings of its own command explorer.
In the Command Palette
enter PowerShell Command Explorer
and press Enter.
If you end up wanting to open a file in the ISE anyway, you can use Shift+Alt+P.
- 4sysops has a great article on configuring VSCode to be more like the ISE.
- Mike F Robbins has a really good post on setting up VSCode.
- Learn PowerShell has an excellent write up on getting VSCode setup for PowerShell.
If you know of more ways to make VSCode feel more familiar for ISE users, please contribute to this doc. If there's a compatibility configuration you're looking for, but you can't find any way to enable it, please open an issue and ask away!
We are always happy to accept PRs and contributions as well!
F1 OR Ctrl+Shift+P (Cmd+Shift+P on macOS)
A handy way of executing commands in VSCode. See the VSCode docs for more details.