Syntax:
(Summarized from the bootstrapper source code)
Start-EditorServices
#Common to Every Parameter Set:
[-HostName <String, Mandatory, Not Null or Empty>]
[-HostProfileId <String, Mandatory, Not Null or Empty>]
[-HostVersion <String, Mandatory, Not Null or Empty>]
[-BundledModulesPath <String, Not Null or Empty>]
[-LogPath <Not Null or Empty>]
[-LogLevel <String: "Diagnostic", "Verbose", "Normal", "Warning", "Error"]
[-SessionDetailsPath <String, Mandatory, Not Null or Empty>]
[-EnableConsoleRepl <Switch>]
[-UseLegacyReadLine <Switch>]
[-DebugServiceOnly <Switch>]
[-LanguageServiceOnly <Switch>]
[-AdditionalModules <String[]>]
[-FeatureFlags <String[]>]
[-WaitForDebugger <Switch>]
[-ConfirmInstall <Switch>]
#NamedPipe Parameter Set (Default):
[-LanguageServicePipeName = $null <String>]
[-DebugServicePipeName = $null <String>]
#Stdio Parameter Set:
[-Stdio <Switch>]
#NamedPipeSimplex Parameter Set:
[-SplitInOutPipes <Switch>]
[-LanguageServiceInPipeName <String>]
[-LanguageServiceOutPipeName <String>]
[-DebugServiceInPipeName = $null <String>]
[-DebugServiceOutPipeName = $null <String>]
Details:
Synopsis (Also from the bootstrapper source code):
Starts the language and debug services from the PowerShellEditorServices module.
Description (Again, bootstrapper):
PowerShell Editor Services Bootstrapper Script:
This script contains startup logic for the PowerShell Editor Services module when launched by an editor. It handles the following tasks:
- Verifying the existence of dependencies like PowerShellGet
- Verifying that the expected version of the PowerShellEditorServices module is installed
- Installing the PowerShellEditorServices module if confirmed by the user
- Creating named pipes for the language and debug services to use (if using named pipes)
- Starting the language and debug services from the PowerShellEditorServices module
Developer/Contributor Details:
Assembly (Loaded by PowerShellEditorServices.psd1, the PSES module)
- When run by PowerShell Core, this is loaded:
- 'bin/Core/Microsoft.PowerShell.EditorServices.Hosting.dll'
- On any other PowerShell:
- 'bin/Desktop/Microsoft.PowerShell.EditorServices.Hosting.dll'
Assembly Source Code:
- PSES/src/PowerShellEditorServices.Hosting
- per PowerShellEditorServices.Hosting.csproj, the ../PowerShellEditorServices/PowerShellEditorServices.csproj is included at compilation
- PSES/src/PowerShellEditorServices
Omnisharp Source Code:
Parameters:
HostName (Breakdown):
- Hostname is used primarily to generate Runspaces using a C# PShost object. This object abstractly represents the PowerShell host. The PShost.name field (Hostname) is a reader-friendly string, which can be used identify the PSHost object. PSHost objects can be used to list runspaces under the PowerShell host and identify the host's appdomain
- Default Value: "PowerShell Editor Services Host" (set by HostStartupInfo then pulled into PSHost.name during PSInternalHost construction)
- It's secondary purpose is for logging
HostProfileId (Breakdown):
- HostProfileId is a filename prefix used to identify the profile.ps1 file used by PowerShell Editor Services.
- Default Value: Microsoft.PowerShellEditorServices
- Can be found in:
- AllUsersAllHosts: "$( $profile.AllUsersAllHosts )/$( $HostProfileId )_profile.ps1"
- AllUsersCurrentHost: "$( $profile.AllUsersCurrentHost )/$( $HostProfileId )_profile.ps1"
- CurrentUserAllHosts: "$( $profile.CurrentUserAllHosts )/$( $HostProfileId )_profile.ps1"
- CurrentUserCurrentHost: "$( $profile.CurrentUserCurrentHost )/$( $HostProfileId )_profile.ps1"
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
Moved to Instructions and to this Public Gist: https://gist.github.com/smartguy1196/1959ec985968358be20219abe49fdf97
Are you sure? yes | no