How to replicate the ISE experience in Visual Studio Code
While the PowerShell extension for VSCode doesn't 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.
This feature is available in the PowerShell Preview extension since version 2019.12.0 and in the PowerShell extension since version 2020.3.0.
The easiest way to replicate the ISE experience in Visual Studio Code is by turning on "ISE Mode". To do this, open the command pallet (F1 OR Ctrl+Shift+P OR Cmd+Shift+P on macOS) and type in "ISE Mode". Select "PowerShell: Enable ISE Mode" from the list.
This command will apply a lot of the settings found in this document automatically. The result looks like this:
The rest of this article includes more detailed information on settings in ISE Mode and some additional settings.
|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|
Custom Key bindings
You can configure your own key bindings in VSCode as well.
Simplified ISE-like UI
If you're looking to simplify the Visual Studio Code UI to look more closely to the UI of the ISE, apply these two settings:
"workbench.activityBar.visible": false, "debug.openDebug": "neverOpen",
These settings are included in "ISE Mode".
This will hide the "Activity Bar" and the "Debug Side Bar" sections below inside of the red box:
The end result looks like this:
To enable more ISE-like tab completion, add this setting:
This setting was added directly to VSCode (rather than in the extension). Its behavior is determined by VSCode directly and cannot be changed by the extension.
No focus on console when executing
To keep the focus in the editor when you execute with F8:
The default is
true for accessibility purposes.
Don't start integrated console on startup
To stop the integrated console on startup, set:
The background PowerShell process will still start since that provides IntelliSense, script analysis, symbol navigation, etc. But the console won't be shown.
Assume files are PowerShell by default
To make new/untitled files, register as PowerShell by default:
There are a number of ISE themes available for VSCode to make the editor look much more like the ISE.
In the Command Palette
theme to get
Preferences: Color Theme and press Enter.
In the drop-down list, select
You can set this theme in the settings with:
"workbench.colorTheme": "PowerShell ISE",
PowerShell Command Explorer
Thanks to the work of @corbob, the PowerShell extension has the beginnings of its own command explorer.
In the Command Palette,
PowerShell Command Explorer and press Enter.
This is shown automatically in "ISE Mode".
Open in the ISE
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 great 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, contribute to this doc. If there's a compatibility configuration you're looking for, but you can't find any way to enable it, open an issue and ask away!
We're 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. For more information, see the VSCode docs.