vscode-powershell

Provides PowerShell language and debugging support for Visual Studio Code

Github星跟踪图

PowerShell Language Support for Visual Studio Code

Build Status
Codacy Badge
Dependabot Status
Version
Installs
Discord
Join the chat at https://gitter.im/PowerShell/vscode-powershell

This extension provides rich PowerShell language support for Visual Studio Code.
Now you can write and debug PowerShell scripts using the excellent IDE-like interface
that Visual Studio Code provides.

This extension is powered by the PowerShell language server,
PowerShell Editor Services.
This leverages the
Language Server Protocol
where PowerShellEditorServices is the server and vscode-powershell is the client.

Platform support

  • Windows 7 through 10 with Windows PowerShell v3 and higher, and PowerShell Core
  • Linux with PowerShell Core (all PowerShell-supported distributions)
  • macOS and OS X with PowerShell Core

Read the installation instructions
to get more details on how to use the extension on these platforms.

Read the FAQ for answers to common questions.

Features

  • Syntax highlighting
  • Code snippets
  • IntelliSense for cmdlets and more
  • Rule-based analysis provided by PowerShell Script Analyzer
  • Go to Definition of cmdlets and variables
  • Find References of cmdlets and variables
  • Document and workspace symbol discovery
  • Run selected selection of PowerShell code using F8
  • Launch online help for the symbol under the cursor using Ctrl+F1
  • Local script debugging and basic interactive console support!

Installing the Extension

You can install the official release of the PowerShell extension by following the steps
in the Visual Studio Code documentation.
In the Extensions pane, search for "PowerShell" extension and install it there. You will
get notified automatically about any future extension updates!

You can also install a VSIX package from our Releases page by following the
Install from a VSIX
instructions. The easiest way is through the command line:

code --install-extension PowerShell-<version>.vsix

NOTE: If you are using VS Code Insiders, the command will be code-insiders.

Script-based Installation

If you're on Windows 7 or greater with the PowerShellGet
module installed, you can easily install both Visual Studio Code and the PowerShell
extension by running the following command:

Install-Script Install-VSCode -Scope CurrentUser; Install-VSCode.ps1

You will need to accept the prompts that appear if this is your first time running
the Install-Script command.

Alternatively you can download and execute the script directly from the web
without the use of Install-Script. However we highly recommend that you
read the script
first before running it in this way!

iex (iwr https://raw.githubusercontent.com/PowerShell/vscode-powershell/master/scripts/Install-VSCode.ps1)

Reporting Problems

If you experience any problems with the PowerShell Extension, see
the troubleshooting docs for information
on diagnosing and reporting issues.

Security Note

For any security issues, please see here.

Example Scripts

There are some example scripts in the extension's examples folder that you can
use to discover PowerShell editing and debugging functionality. Please
check out the included README.md file to learn more about
how to use them.

This folder can be found at the following path:

$HOME/.vscode[-insiders]/extensions/ms-vscode.PowerShell-<version>/examples

or if you're using the preview version of the extension

$HOME/.vscode[-insiders]/extensions/ms-vscode.powershell-preview-<version>/examples

To open/view the extension's examples in Visual Studio Code, run the following from your PowerShell command prompt:

code (Get-ChildItem $Home\.vscode\extensions\ms-vscode.PowerShell-*\examples)[-1]

Contributing to the Code

Check out the development documentation for more details
on how to contribute to this extension!

Maintainers

License

This extension is licensed under the MIT License. Please see the
third-party notices file for details on the third-party
binaries that we include with releases of this project.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct.
For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

主要指标

概览
名称与所有者PowerShell/vscode-powershell
主编程语言TypeScript
编程语言PowerShell (语言数: 3)
平台
许可证MIT License
所有者活动
创建于2015-09-08 18:29:04
推送于2025-03-26 23:04:12
最后一次提交
发布数195
最新版本名称v2025.3.0-preview (发布于 )
第一版名称v0.1.0 (发布于 2015-11-20 08:13:27)
用户参与
星数1.8k
关注者数111
派生数512
提交数2.9k
已启用问题?
问题数2877
打开的问题数363
拉请求数1886
打开的拉请求数3
关闭的拉请求数311
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?