1
1
# PowerShell for Visual Studio Code
2
2
3
3
[ ![ Build Status] ( https://dev.azure.com/powershell/vscode-powershell/_apis/build/status/PowerShell.vscode-powershell?branchName=main )] ( https://dev.azure.com/powershell/vscode-powershell/_build/latest?definitionId=51&branchName=main )
4
- [ ![ Version] ( https://vsmarketplacebadges.dev/version-short/ ms-vscode.powershell.svg )] ( https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell )
5
- [ ![ Installs] ( https://vsmarketplacebadges.dev/installs-short/ ms-vscode.powershell.svg )] ( https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell )
4
+ [ ![ Version] ( https://img.shields.io/visual-studio-marketplace/v/ ms-vscode.PowerShell )] ( https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell )
5
+ [ ![ Installs] ( https://img.shields.io/visual-studio-marketplace/i/ ms-vscode.PowerShell )] ( https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell )
6
6
[ ![ Join the chat on Discord] ( https://img.shields.io/discord/180528040881815552.svg?label=%23vscode&logo=discord&logoColor=white )] ( https://aka.ms/powershell-vscode-discord )
7
- [ ![ Join the chat on Gitter] ( https://badges.gitter.im/PowerShell/vscode-powershell.svg )] ( https://gitter.im/PowerShell/vscode-powershell?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge )
8
7
9
- This extension provides rich PowerShell language support for [ Visual Studio Code] ( https://github.com/Microsoft/vscode ) (VS Code).
8
+ This extension provides rich [ PowerShell] [ ] language support for [ Visual Studio Code] [ ] (VS Code).
10
9
Now you can write and debug PowerShell scripts using the excellent IDE-like interface
11
10
that VS Code provides.
12
11
13
- This extension is powered by the PowerShell language server,
14
- [ PowerShell Editor Services] ( https://github.com/PowerShell/PowerShellEditorServices ) .
15
- This leverages the
16
- [ Language Server Protocol] ( https://microsoft.github.io/language-server-protocol/ )
17
- where ` PowerShellEditorServices ` is the server and ` vscode-powershell ` is the client.
18
-
19
- Also included in this extension is the PowerShell ISE theme for Visual Studio Code. It is
20
- not activated by default, but after installing this extension either click "Set Color
21
- Theme" or use the [ theme picker] ( https://code.visualstudio.com/docs/getstarted/themes ) and
22
- select "PowerShell ISE" for a fun and familiar experience.
12
+ This repository, ` vscode-powershell ` , is the [ Language Server Protocol] [ ] client for VS
13
+ Code and [ ` PowerShellEditorServices ` ] [ ] is the server (also used by other editors, such as
14
+ Emacs and Vim).
15
+
16
+ [ PowerShell ] : https://github.com/PowerShell/PowerShell
17
+ [ Visual Studio Code ] : https://github.com/Microsoft/vscode
18
+ [ `PowerShellEditorServices` ] : https://github.com/PowerShell/PowerShellEditorServices
19
+ [ Language Server Protocol ] : https://microsoft.github.io/language-server-protocol/
20
+
21
+ ## Available Features
22
+
23
+ - [ Syntax highlighting] [ ]
24
+ - Advanced built-in [ code snippets] [ ]
25
+ - [ IntelliSense] [ ] for cmdlets and more
26
+ - [ Problems] [ ] reported by [ PowerShell Script Analyzer] [ ]
27
+ - [ Go to Definition] [ ] of cmdlets, variables, classes and more
28
+ - [ Find References] [ ] of cmdlets, variables, classes and more
29
+ - Document and Workspace [ Symbol Navigation] [ ]
30
+ - Symbol-based [ Outline View] [ ]
31
+ - Run selected PowerShell code in current terminal using <kbd >F8</kbd >
32
+ - Launch online help for the symbol under the cursor using <kbd >Ctrl+F1</kbd >
33
+ - PowerShell [ Debugger] [ ] integration
34
+ - An Extension Terminal that can interact with the debugger (try ` Set-PSBreakpoint ` !)
35
+ - PowerShell ISE theme findable in the [ theme picker] [ ]
36
+ - Also try ISE Mode with the ** Toggle ISE Mode** command
37
+
38
+ Bundled with the extension is the PowerShell ISE theme. It is not activated by default,
39
+ but after installing this extension either click ** Set Color Theme** or use the [ theme
40
+ picker] [ ] and select ** PowerShell ISE** .
41
+
42
+ [ Syntax highlighting ] : https://github.com/PowerShell/EditorSyntax
43
+ [ code snippets ] : https://code.visualstudio.com/docs/editor/userdefinedsnippets
44
+ [ IntelliSense ] : https://code.visualstudio.com/docs/editor/intellisense
45
+ [ Problems ] : https://code.visualstudio.com/docs/getstarted/tips-and-tricks#_errors-and-warnings
46
+ [ PowerShell Script Analyzer ] : http://github.com/PowerShell/PSScriptAnalyzer
47
+ [ Go to Definition ] : https://code.visualstudio.com/docs/editor/editingevolved#_go-to-definition
48
+ [ Find References ] : https://code.visualstudio.com/docs/editor/editingevolved#_reference-information
49
+ [ Symbol Navigation ] : https://code.visualstudio.com/docs/editor/editingevolved#_open-symbol-by-name
50
+ [ Outline View ] : https://code.visualstudio.com/docs/getstarted/userinterface#_outline-view
51
+ [ Debugger ] : https://learn.microsoft.com/powershell/scripting/dev-cross-plat/vscode/using-vscode#debugging-with-visual-studio-code
52
+ [ theme picker ] : https://code.visualstudio.com/docs/getstarted/themes
23
53
24
54
## Platform Support
25
55
26
- The extension _ should_ work anywhere VS Code itself and PowerShell Core 7.2 or higher is
27
- [ supported] [ ] . For Windows PowerShell, only version 5.1 is supported. Please note that
28
- PowerShell Core 6, 7.0, and 7.1 have reached end-of-support. Our test matrix includes the
29
- following:
30
-
31
- - ** Windows Server 2022** with Windows PowerShell 5.1 and PowerShell Core 7.2.11
32
- - ** Windows Server 2019** with Windows PowerShell 5.1 and PowerShell Core 7.2.11
33
- - ** macOS 11** with PowerShell Core 7.2.11
34
- - ** Ubuntu 20.04** with PowerShell Core 7.2.11
56
+ The extension should work anywhere VS Code itself and PowerShell Core 7.2 or higher is
57
+ [ supported] [ ] . For Windows PowerShell, only version 5.1 is supported and only on a best-effort
58
+ basis. PowerShell Core 6, 7.0, and 7.1 have reached end-of-support. We test the following
59
+ configurations:
35
60
36
- [ supported ] : https://docs.microsoft.com/en-us/powershell/scripting/powershell-support-lifecycle
61
+ - ** Windows Server 2022** with Windows PowerShell 5.1 and PowerShell Core 7.2
62
+ - ** Windows Server 2019** with Windows PowerShell 5.1 and PowerShell Core 7.2
63
+ - ** macOS 11** with PowerShell Core 7.2
64
+ - ** Ubuntu 20.04** with PowerShell Core 7.2
37
65
38
- Read the [ installation instructions] ( https://docs.microsoft.com/en-us/powershell/scripting/components/vscode/using-vscode )
66
+ Read the [ installation instructions] [ ]
39
67
to get more details on how to use the extension on these platforms.
40
68
41
69
For Windows PowerShell 5.1, [ .NET Framework 4.8] [ dotnet-framework ] or higher is required.
42
70
71
+ [ supported ] : https://docs.microsoft.com/en-us/powershell/scripting/powershell-support-lifecycle
72
+ [ installation instructions ] : https://docs.microsoft.com/en-us/powershell/scripting/components/vscode/using-vscode
43
73
[ dotnet-framework ] : https://dotnet.microsoft.com/en-us/download/dotnet-framework
44
74
45
- ** Read the [ troubleshooting guide] ( ./docs/troubleshooting.md ) for answers to common questions.**
46
-
47
- ## Features
48
-
49
- - Syntax highlighting
50
- - Code snippets
51
- - IntelliSense for cmdlets and more
52
- - Rule-based analysis provided by [ PowerShell Script Analyzer] ( http://github.com/PowerShell/PSScriptAnalyzer )
53
- - Go to Definition of cmdlets and variables
54
- - Find References of cmdlets and variables
55
- - Document and workspace symbol discovery
56
- - Run selected selection of PowerShell code using <kbd >F8</kbd >
57
- - Launch online help for the symbol under the cursor using <kbd >Ctrl</kbd >+<kbd >F1</kbd >
58
- - Local script debugging
59
- - Extension Terminal support
60
- - PowerShell ISE color theme
61
-
62
75
## Installing the Extension
63
76
64
- You can install the official release of the PowerShell extension by following the steps
65
- in the [ Visual Studio Code documentation ] ( https://code.visualstudio.com/docs/editor/ extension-gallery ) .
66
- In the Extensions pane, search for "PowerShell" extension and install it there. You will
67
- get notified automatically about any future extension updates!
77
+ The PowerShell extension can be installed from the Visual Studio Code Marketplace by
78
+ clicking the [ ** Install Button ** ] [ ] . You can also install the PowerShell extension from
79
+ within VS Code by opening the ** Extensions ** view with keyboard shortcut
80
+ < kbd >Ctrl+Shift+X</ kbd >, typing PowerShell, and selecting the extension.
68
81
69
- You can also install a VSIX package from our [ releases page] ( https://github.com/PowerShell/vscode-powershell/releases ) by following the
70
- [ Install from a VSIX] ( https://code.visualstudio.com/docs/editor/extension-gallery#_install-from-a-vsix )
71
- instructions. The easiest way is through the command line:
82
+ We would encourage you to try the _ pre-release_ version whenever possible. When a
83
+ _ Pre-Release_ is available, it can be installed from the marketplace using the
84
+ ** Switch to Pre-Release Version** button. You can switch back to the stable version of the
85
+ extension by using the ** Switch to Release Version** button that will appear. You can also
86
+ downgrade to other versions of the extension using the arrow next to the ** Uninstall**
87
+ button and choosing ** Install Another Version** .
72
88
73
- ``` powershell
74
- code --install-extension powershell-<version>.vsix
75
- ```
89
+ [ **Install Button** ] : vscode:extension/ms-vscode.PowerShell
76
90
77
- > NOTE: If you are using VS Code Insiders, the command will be ` code-insiders ` .
91
+ ## Getting Help
78
92
79
- ### Script-based Installation
93
+ If you experience any problems with the PowerShell Extension, see the
94
+ [ troubleshooting docs] ( docs/troubleshooting.md ) for common issues.
80
95
81
- If you're on Windows 7 or greater with the [ PowerShellGet] ( https://msdn.microsoft.com/powershell/gallery/readme )
82
- module installed, you can easily install both Visual Studio Code and the PowerShell
83
- extension by running the following command:
96
+ If you find a bug, please [ open an issue] [ ] so we can fix it.
84
97
85
- ``` powershell
86
- Install-Script Install-VSCode -Scope CurrentUser; Install-VSCode.ps1
87
- ```
98
+ Don't forget to check out the official guide on
99
+ [ Using VS Code for PowerShell Development] [ ] .
88
100
89
- You will need to accept the prompts that appear if this is your first time running
90
- the ` Install-Script ` command.
101
+ [ Using VS Code for PowerShell Development ] : https://learn.microsoft.com/en-us/powershell/scripting/dev-cross-plat/vscode/using-vscode
102
+ [ open an issue ] : https://github.com/PowerShell/vscode-powershell/issues/new/choose
91
103
92
- ** Alternatively** you can download and execute the script directly from the web
93
- without the use of ` Install-Script ` . However we ** highly recommend** that you
94
- [ read the script] ( https://raw.githubusercontent.com/PowerShell/vscode-powershell/main/scripts/Install-VSCode.ps1 )
95
- first before running it in this way!
96
-
97
- ``` powershell
98
- iex (iwr https://raw.githubusercontent.com/PowerShell/vscode-powershell/main/scripts/Install-VSCode.ps1)
99
- ```
100
-
101
- ## Reporting Problems
104
+ ## Contributing to the Code
102
105
103
- If you experience any problems with the PowerShell Extension, see
104
- [ the troubleshooting docs] ( ./docs/troubleshooting.md ) for information
105
- on diagnosing and reporting issues.
106
+ Check out the [ development documentation] ( docs/development.md ) for more details
107
+ on how to contribute to this extension!
106
108
107
109
## Security Note
108
110
109
111
For any security issues, please see [ here] ( ./SECURITY.md ) .
110
112
111
- ## Example Scripts
112
-
113
- There are some example scripts in the extension's ` examples ` folder that you can
114
- use to discover PowerShell editing and debugging functionality. Please
115
- check out the included [ README.md] ( examples/README.md ) file to learn more about
116
- how to use them.
117
-
118
- This folder can be found at the following path:
119
-
120
- ``` powershell
121
- $HOME/.vscode[-insiders]/extensions/ms-vscode.powershell[-preview]-<version>/examples
122
- ```
123
-
124
- To open/view the extension's examples in Visual Studio Code, run the following from your
125
- PowerShell session:
126
-
127
- ``` powershell
128
- code (Get-ChildItem $HOME/.vscode/extensions/ms-vscode.powershell-*/examples)[-1]
129
- ```
130
-
131
- ## Contributing to the Code
132
-
133
- Check out the [ development documentation] ( docs/development.md ) for more details
134
- on how to contribute to this extension!
135
-
136
113
## Maintainers
137
114
138
- - Patrick Meinecke - [ @SeeminglyScience ] ( https://github.com/SeeminglyScience )
115
+ ### Current
116
+
139
117
- Andy Jordan - [ @andschwa ] ( https://github.com/andschwa )
118
+ - Patrick Meinecke - [ @SeeminglyScience ] ( https://github.com/SeeminglyScience )
140
119
- Sydney Smith - [ @SydneyhSmith ] ( https://github.com/SydneyhSmith )
141
120
142
121
### Emeriti
@@ -148,7 +127,7 @@ on how to contribute to this extension!
148
127
149
128
## License
150
129
151
- This extension is [ licensed under the MIT License] ( LICENSE.txt ) . Please see the
130
+ This extension is [ licensed under the MIT License] ( LICENSE.txt ) . Please see the
152
131
[ third-party notices] ( Third%20Party%20Notices.txt ) file for details on the third-party
153
132
binaries that we include with releases of this project.
154
133
0 commit comments