How powershell/vscode-powershell works
PowerShell for VS Code is an LSP client extension: a user works in VS Code, the extension starts a PowerShell process and connects to PowerShell Editor Services, then exposes language, terminal, and debugging capabilities through VS Code. The graph preserves documented capabilities whose implementation was not sampled. Source excerpts show session/process setup and feature registrations/imports, but not every runtime call between features and the language client; those internal links are omitted rather than inferred.
Main entry points: extension.ts Extension activation · session.ts Session manager · process.ts PowerShell process · platform.ts PowerShell discovery
Components 27
Extension lifecycle
- Extension activation
src/extension.ts - Session manager
src/session.ts - PowerShell process
src/process.ts - PowerShell discovery
src/platform.ts - Settings and cwd
src/settings.ts - Logging
src/logging.ts
Language features
- Language client readiness
src/languageClientConsumer.ts - Code actions
src/features/CodeActions.ts - Alias expansion
src/features/ExpandAlias.ts - Help completion
src/features/HelpCompletion.ts - Command explorer
src/features/GetCommands.ts - Help viewer
src/features/ShowHelp.ts - Language intelligence
- Syntax and snippets
snippets/PowerShell.json - Language model tools
src/features/LanguageModelTools.ts
User interaction
- Extension terminal
src/features/Console.ts - Editor commands
src/features/ExtensionCommands.ts - Debugger integration
src/features/DebugSession.ts - ISE compatibility
src/features/ISECompatibility.ts - Remote files
src/features/RemoteFiles.ts - Pester test integration
src/features/PesterTests.ts - PowerShell update
src/features/UpdatePowerShell.ts - External API
src/features/ExternalApi.ts
Other components
- VS Code user
- Visual Studio Code
- PowerShell Editor Services
- PowerShell engine
Connections 32
- VS Code user → Visual Studio Code: uses
README.md - Visual Studio Code → Extension activation: activates
src/extension.ts - Extension activation → Session manager: creates
src/extension.ts - Session manager → PowerShell discovery: discovers
src/session.ts - Session manager → PowerShell process: starts
src/session.ts - PowerShell process → Settings and cwd: validates cwd
src/process.ts - PowerShell discovery → Settings and cwd: updates
src/platform.ts - Extension activation → Logging: creates
src/extension.ts - Session manager → PowerShell Editor Services: connects
README.md - PowerShell process → PowerShell engine: launches
- PowerShell Editor Services → PowerShell engine: uses
README.md - Extension activation → Language client readiness: registers consumers
src/extension.ts - Session manager → Language client readiness: signals client lifecycle
src/session.ts - Extension activation → Code actions: registers
src/extension.ts - Extension activation → Alias expansion: registers
src/extension.ts - Extension activation → Help completion: registers
src/extension.ts - Extension activation → Command explorer: registers
src/extension.ts - Extension activation → Help viewer: registers
src/extension.ts - Extension activation → Extension terminal: registers
src/extension.ts - Extension activation → Editor commands: registers
src/extension.ts - Extension activation → Debugger integration: registers
src/extension.ts - Extension activation → ISE compatibility: registers
src/extension.ts - Extension activation → Remote files: registers
src/extension.ts - Extension activation → Pester test integration: registers
src/extension.ts - Extension activation → PowerShell update: registers
- Extension activation → External API: registers
src/extension.ts - Extension activation → Language model tools: registers
src/extension.ts - Visual Studio Code → Language intelligence: provides
README.md - Visual Studio Code → Syntax and snippets: uses
README.md - Language intelligence → PowerShell Editor Services: requests language services
README.md - VS Code user → Extension terminal: runs selection
README.md - VS Code user → Debugger integration: starts debugging
README.md