Microsoft has released a ‘major update' to the PowerShell extension for Visual Studio Code, bringing, among other things, an ISE compatibility mode. The update builds on months of work and also improves performance and the editing experience.
Previously, the Visual Studio Code for Powershell 7 plugin did let users replicate the ISE experience of PowerShell 6 and lower, but it was a more complicated process. Now, users can just click on the PowerShell icon and type ‘Enable ISE Mode'.
The team has also made PSReadLine available for the extension. With it, you get access to features like syntax highlighting, multi-line editing, and back search. This addition has been highly requested, but the team says it required a lot of hard work to implement.
“Full PSReadLine support has long been at the top of our list for feature requests.
It has also been among our most difficult problems to solve because at its core it also required architectural changes in how the PowerShell extension manages threading and runspaces,” said Microsoft's Sydney Smith in a blog post. “The additional challenge of trying to support both legacy versions of PowerShell and a range of platform distributions has caused this problem to continually be delayed.”
On top of all this, there have been significant improvements to performance and stability for the PowerShell editing experience. Due to constraints of the original extension, this required the team to re-architect it, also increasing the stability of the debugger and this logging would-be crashes.