PowerShell Editor Services
PowerShell Editor Services is a PowerShell module that provides common functionality needed to enable a consistent and robust PowerShell development experience in almost any editor or integrated development environment (IDE).
- The Language Service provides common editor features for the PowerShell language:
- Code navigation actions (find references, go to definition)
- Statement completions (IntelliSense)
- Real-time semantic analysis of scripts using PowerShell Script Analyzer
- The Debugging Service simplifies interaction with the PowerShell debugger (breakpoints, variables, call stack, etc)
- The $psEditor API enables scripting of the host editor
- A full, terminal-based Integrated Console experience for interactive development and debugging
Important note regarding the .NET APIs in Microsoft.PowerShell.EditorServices.dll
With the 1.0 release of PowerShell Editor Services, we have deprecated the public APIs of the following classes:
The intended usage model is now to host PowerShell Editor Services within powershell.exe and communicate with it over named pipes (or Unix domain sockets on macOS & Linux) via the Language Server Protocol and Debug Adapter Protocol. Detailed usage documentation for this module is coming soon!
|AppVeyor (Windows)||Travis CI (Linux / macOS)|
TODO: Add information about acquiring packages from NuGet and npm once those are available.
1. On Linux or macOS, install PowerShell Core
If you are using Windows, skip this step. If you are using Linux or macOS, you will need to install PowerShell by following these instructions.
If you are using macOS you will need to download the latest version of OpenSSL. The easiest way to get this is from Homebrew. After installing Homebrew execute the following commands:
brew update brew install openssl mkdir -p /usr/local/lib ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/ ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/
2. On Windows, install the .NET 4.5.1 Targeting Pack
NOTE: This is only necessary if you don't have Visual Studio installed
If you try to build the code and receive an error about a missing .NET 4.5.1 Targeting Pack, you should download and install the .NET Framework 4.5.2 Developer Pack.
3. Clone the GitHub repository:
git clone https://github.com/PowerShell/PowerShellEditorServices.git
This step requires PowerShellGet, included by default with PowerShell v5 and up but installable on PowerShell v3 and v4.
Install-Module InvokeBuild -Scope CurrentUser
Now you're ready to build the code. You can do so in one of two ways:
Building the code from PowerShell
PS C:\path\to\PowerShellEditorServices> Invoke-Build Build
Building the code from Visual Studio Code
Open the PowerShellEditorServices folder that you cloned locally and press Ctrl+Shift+B (or Cmd+Shift+B on macOS).
We would love to incorporate community contributions into this project. If you would like to contribute code, documentation, tests, or bug reports, please read our Contribution Guide to learn more.
- Keith Hill - @r_keith_hill
- Patrick Meinecke - @SeeminglyScienc
- Tyler Leonhardt - @TylerLeonhardt
- David Wilson - @daviwil
This project is licensed under the MIT License.