Giter Club home page Giter Club logo

vscode-powershell's Introduction

PowerShell for Visual Studio Code

Build Status Version Installs Join the chat on Discord Join the chat on Gitter

This extension provides rich PowerShell language support for Visual Studio Code (VS Code). Now you can write and debug PowerShell scripts using the excellent IDE-like interface that VS 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.

Also included in this extension is the PowerShell ISE theme for Visual Studio Code. It is not activated by default, but after installing this extension either click "Set Color Theme" or use the theme picker and select "PowerShell ISE" for a fun and familiar experience.

Platform Support

The extension should work anywhere VS Code itself and PowerShell Core 7.2 or higher is supported. For Windows PowerShell, only version 5.1 is supported. Please note that PowerShell Core 6 is end-of-life and so not supported. Our test matrix includes the following:

  • Windows Server 2022 with Windows PowerShell 5.1 and PowerShell Core 7.2.7
  • Windows Server 2019 with Windows PowerShell 5.1 and PowerShell Core 7.2.7
  • macOS 11 with PowerShell Core 7.2.7
  • Ubuntu 20.04 with PowerShell Core 7.2.7

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

Read the troubleshooting guide 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
  • Extension Terminal support
  • PowerShell ISE color theme

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/main/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[-preview]-<version>/examples

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

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

Emeriti

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.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

vscode-powershell's People

Contributors

andyleejordan avatar dependabot[bot] avatar daviwil avatar tylerleonhardt avatar rkeithhill avatar dependabot-preview[bot] avatar rjmholt avatar sydneyhsmith avatar github-actions[bot] avatar bergmeister avatar corbob avatar dfinke avatar glennsarti avatar janegilring avatar travisclagrone avatar pcgeek86 avatar travisez13 avatar justingrote avatar xtqqczze avatar kamilkosek avatar seeminglyscience avatar nohwnd avatar aspenforester avatar powerschill avatar vmsilvamolina avatar omniomi avatar mad-mike avatar fullenw1 avatar isidorn avatar sqlvariant avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.