Back in April of 2015, Microsoft announced Visual Studio Code, a free, cross-platform source code editor based on the Electron framework, which makes use of the same editor component from Visual Studio Team Services (formerly Visual Studio Online). This is geared towards simpler programming tasks, and shouldn't be confused with the full Visual Studio IDE.
Following its announcement, the application quickly passed half a million downloads, and has been growing ever since, with a number of plug-ins available to extend its capabilities. One such plug-in, PowerShell, has now reached version 1.0, which brings quite a few improvements.
Microsoft's David Wilson details on the Windows PowerShell blog that this update has been pushed out now to "line up with the PowerShell Core 6.0 Beta.1 release", which brings support for the "official PowerShell development experience" on all supported platforms: Windows 7 through 10, via PowerShell v3 or higher; macOS and OS X via PowerShell v6; as well as Linux with PowerShell v6, but only on "PowerShell-supported distribtions". Here are the new features:
- PowerShell ISE-like interactive development experience with the PowerShell Integrated Console
- Rich debugging experience including variables view, call stack, watch window, and various breakpoint types
- Integrated script analysis and code fixes provided by PSScriptAnalyzer
- Code navigations that allow you to find definitions and references of functions across your script files
- Highly configurable code formatter based on community best practices
- New file and project creation using Plaster templates
- Editor scripting API through the $psEditor object model
The original plan was to ship the pre-1.0 versions of the PowerShell extension as separate betas, much like the team has done with PowerShell Core. That said, the Visual Studio Marketplace does not currently support the input of pre-release naming schemes such as 1.0.0-beta.1, which is why the regular 1.0 numbering scheme was chosen.
Wilson has also outlined some of the features which would be coming to the extension in subsequent versions:
- PowerShell “Project Model” via Plaster – We will be expanding Plaster to provide a rich toolset for developing PowerShell modules in any editor supported by PowerShell Editor Services. More details on this effort will be shared in the near future.
- PSReadline support – We will add support for PSReadline in the Integrated Console to give the best possible command-line experience within the editor.
- Expanded $psEditor APIs – We will make the editor even more scriptable with new APIs added in future updates.
- Localization – English is currently the only supported language but we will eventually be adding other languages as requested by our community and partners.
- User Guide – We are currently producing a complete User Guide for the extension that will help new users become productive quickly!
- Instructional Videos – We will be producing a series of videos explaining how to use the PowerShell extension for script, module, and DSC resource development. Subscribe to the PowerShell Team’s YouTube channel to be notified as they are released!
In closing, David Wilson pointed out that throughout the history of Windows PowerShell, the PowerShell ISE (Integrated Scripting Environment) has been its official editor. There are no plans to remove it from Windows, but Wilson did underline the fact that due to Visual Studio Code's cross-platform nature, more resources will be dedicated to it rather than PowerShell ISE. Regarding the latter, he said that the team will "consider investing effort there in the future if there is a high demand for it".
For those who do not have it, the PowerShell extension for Visual Studio Code is available in the Visual Studio Marketplace.
Editor's note: The opening statement of the article has been reworked to clarify the distinction between Visual Studio Code and the full Visual Studio IDE.