- Clone vscode-powershell and PowerShellEditorServices as siblings — PSES must be at
../PowerShellEditorServicesrelative to this repo. - Follow the PSES development instructions and build it first.
- Install Node.js 22.x or higher.
- Open
pwsh-extension-dev.code-workspacein Visual Studio Code for recommended extensions and tasks. - Optionally run
git config blame.ignoreRevsFile .git-blame-ignore-revsto ignore formatting commits.
The engines.vscode field in package.json declares the minimum VS Code version we support.
When it is updated:
- Update
@types/vscodeto match (use~not^— patch updates only, not minor) - Check that VS Code version's
package.jsonfor itselectrondependency — the Electron major version determines which Node.js is bundled, which is the runtime the extension actually runs on - Update
@types/nodemajor to match that Node.js version (exact version need not match, but major should) - Update the Node.js version in CI (GitHub Actions) and OneBranch (Azure DevOps) pipelines, and developer machines to match
From VS Code run the build and test tasks, or from PowerShell:
Invoke-Build Build
Invoke-Build TestSee vscode-powershell.build.ps1 for all available targets.
Build first, then use one of the provided Launch Extension debug configurations:
- Launch Extension — uses your personal profile
- Temp Profile — resets on every launch; useful for "out of the box" testing
- Isolated Profile — persistent debug profile for preserving test settings
All configurations support automatic extension host restart on source changes. Hot Reload is also enabled for PowerShell Editor Services.
Warning
If the extension host restarts, the PSES debugger attachment is lost. Either restart the
full debug session, or rebuild PSES and run Attach to Editor Services manually.
Use powershell.developer.editorServicesWaitForDebugger to ensure full attachment before
startup continues.
See snippet requirements.
Azure DevOps access (Microsoft employees only) is required for signing and publishing.
The Git remote origin = GitHub, ado = the internal Azure DevOps mirror.
cd ./PowerShellEditorServices
git checkout -B release
./tools/updateVersion.ps1 -Version "4.0.0" -Changes "Major release!"
# Amend changelog as necessary
git push --force-with-lease origin
# Open, approve, and merge PR on GitHub
cd ../vscode-powershell
git checkout -B release
./tools/updateVersion.ps1 -Version "2024.4.0" -Changes "Major release!"
# Amend changelog as necessary
git push --force-with-lease origin
# Open, approve, and merge PR on GitHub
# After both PRs are merged:
cd ../PowerShellEditorServices
git checkout main
git pull
git push ado HEAD:upstream
cd ../vscode-powershell
git checkout main
git pull
git push ado HEAD:upstream
# Download and test assets from draft GitHub Releases
# Publish releases, ensuring tag is at release commit in `main`
# Permit pipeline to publish to marketplaceWhen rolling from pre-release to release, do not update the PSES version — only the
extension needs a new release. The release branch is ephemeral and deleted after each release.
The ADO repo is a superset of GitHub — it includes our commits plus signed PR merge commits,
which is why the ADO push must happen after the PR is merged to main.
The extension uses vYYYY.X.Z (not SemVer). Releases are based on completed work, not a
schedule. Git tags mark releases; GitHub Releases (drafted by the release pipeline) create the tags.
Even minor = release, odd minor = pre-release. A release's minor version is n-1 of
its previewing pre-release (e.g. pre-release v2024.1.0-preview previews release v2024.0.0).
This keeps the marketplace pre-release option always visible (odd > even by version sort).
- The
vprefix is used in Git tags and the changelog (e.g.v2024.0.0), but not inpackage.json'sversionfield (e.g.2024.0.0). TheupdateVersion.ps1-Versionparameter also takes novprefix. - Append
-previewto the version in the changelog and Git tag, but not inpackage.json - The
previewfield inpackage.jsonis alwaysfalse, even for pre-releases — the marketplace derives its state from the latest release inclusive of pre-releases, so setting ittruecaused the extension to permanently appear as a preview extension - Multiple pre-releases increment the patch:
v2024.1.0-preview,v2024.1.1-preview, etc. - PSES must not change version between a pre-release and its subsequent release
- Hotfix releases skip the pre-release step and build off the last release's Git tag
PSES uses standard SemVer (vX.Y.Z), realistically it's Pride Versioning.