diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml
index f4d219b7b2..77c56bc1b9 100644
--- a/.github/ISSUE_TEMPLATE/bug-report.yml
+++ b/.github/ISSUE_TEMPLATE/bug-report.yml
@@ -9,13 +9,10 @@ body:
- label: I have written a descriptive issue title.
required: true
- label: I have searched all [issues](https://github.com/PowerShell/vscode-powershell/issues?q=is%3Aissue) to ensure it has not already been reported.
- required: true
- label: I have read the [troubleshooting](https://github.com/PowerShell/vscode-powershell/blob/master/docs/troubleshooting.md) guide.
- required: true
- label: I am sure this issue is with the _extension itself_ and does not reproduce in a standalone [PowerShell](https://github.com/PowerShell/PowerShell/issues/new/choose) instance.
- required: true
- label: I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
- required: true
+ - label: If this is a security issue, I have read the [security issue reporting guidance](https://github.com/PowerShell/vscode-powershell/blob/master/SECURITY.md).
- type: textarea
attributes:
label: Summary
diff --git a/README.md b/README.md
index 7d6600c782..b61e10f747 100644
--- a/README.md
+++ b/README.md
@@ -28,11 +28,11 @@ The extension _should_ work anywhere VS Code itself and PowerShell Core 7 or hig
PowerShell Core 6 is end-of-life and so not supported. Our test matrix includes the
following:
-- **Windows Server 2019** with Windows PowerShell 5.1 and PowerShell Core 7.1.5
-- **macOS 10.15** with PowerShell Core 7.1.5
-- **Ubuntu 20.04** with PowerShell Core 7.1.5
+- **Windows Server 2019** with Windows PowerShell 5.1 and PowerShell Core 7.2.1
+- **macOS 10.15** with PowerShell Core 7.2.1
+- **Ubuntu 20.04** with PowerShell Core 7.2.1
-[supported]: https://docs.microsoft.com/en-us/powershell/scripting/powershell-support-lifecycle?view=powershell-7.1#supported-platforms
+[supported]: https://docs.microsoft.com/en-us/powershell/scripting/powershell-support-lifecycle
Read the [installation instructions](https://docs.microsoft.com/en-us/powershell/scripting/components/vscode/using-vscode)
to get more details on how to use the extension on these platforms.
@@ -130,7 +130,6 @@ on how to contribute to this extension!
## Maintainers
-- Rob Holt - [@rjmholt](https://github.com/rjmholt)
- Patrick Meinecke - [@SeeminglyScience](https://github.com/SeeminglyScience)
- Andy Schwartzmeyer - [@andschwa](https://github.com/andschwa)
- Sydney Smith - [@SydneyhSmith](https://github.com/SydneyhSmith)
@@ -138,6 +137,7 @@ on how to contribute to this extension!
### Emeriti
- Keith Hill - [@rkeithhill](https://github.com/rkeithhill)
+- Rob Holt - [@rjmholt](https://github.com/rjmholt)
- Tyler Leonhardt - [@TylerLeonhardt](https://github.com/TylerLeonhardt)
- David Wilson - [@daviwil](https://github.com/daviwil)
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 0000000000..f7b89984f0
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,41 @@
+
+
+## Security
+
+Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
+
+If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below.
+
+## Reporting Security Issues
+
+**Please do not report security vulnerabilities through public GitHub issues.**
+
+Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report).
+
+If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc).
+
+You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
+
+Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
+
+ * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
+ * Full paths of source file(s) related to the manifestation of the issue
+ * The location of the affected source code (tag/branch/commit or direct URL)
+ * Any special configuration required to reproduce the issue
+ * Step-by-step instructions to reproduce the issue
+ * Proof-of-concept or exploit code (if possible)
+ * Impact of the issue, including how an attacker might exploit the issue
+
+This information will help us triage your report more quickly.
+
+If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs.
+
+## Preferred Languages
+
+We prefer all communications to be in English.
+
+## Policy
+
+Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd).
+
+
\ No newline at end of file
diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md
index 25b5ea6a82..b86845530c 100644
--- a/docs/troubleshooting.md
+++ b/docs/troubleshooting.md
@@ -1,7 +1,26 @@
# Troubleshooting PowerShell Extension Issues
This document contains troubleshooting steps for commonly reported issues when using the
-[PowerShell Extension] for Visual Studio Code.
+[PowerShell Extension][] for Visual Studio Code.
+
+## How do I change the PowerShell version?
+
+Starting VS Code 1.65, extensions now use the [language status item API][]
+instead of manually adding a button to the status bar. That means the PowerShell icon
+button in the status bar now exists under the language status menu, which looks like:
+`{}`. You can then pin the icon back to the status bar by hovering over that menu and
+clicking the pin button. The PowerShell icon will show you the current session's version,
+and clicking it will let you change to another session.
+
+### Using Windows PowerShell 5.1
+
+While we _highly encourage_ the use of [PowerShell Core 7.2][], if you must use Windows
+PowerShell 5.1 we attempt to support it on a best-effort basis. Unfortunately, being two
+major versions behind and in maintenance mode, Windows PowerShell is missing many of the
+bug fixes and APIs we use to make the extension experience great. So please, if you can,
+use PowerShell Core. That said, when using Windows PowerShell on older versions of the
+Windows operating system, if the extension is failing to start (e.g. [#2571][]), try
+installing [WMF 5.1][].
## How do I debug my PowerShell script?
@@ -13,37 +32,32 @@ Scripting Guys blog posts (thanks community!):
## Script analysis is reporting false errors
-Script analysis is provided by the [PSScriptAnalyzer] project on GitHub. If the warning
+Script analysis is provided by the [PSScriptAnalyzer][] project on GitHub. If the warning
message starts with `[PSScriptAnalyzer]` or if you are getting faulty script diagnostics
-(red and green squiggly lines under PowerShell in scripts) please [open an issue there].
+(red and green squiggly lines under PowerShell in scripts) please [open an issue there][].
## Double-click isn't selecting the whole variable
-Visual Studio Code provides a default set of word separators, that is,
-characters that split words and so affect double-click selections. The editor's
-defaults include both `-` and `$`. In [v2021.5.1] we started providing a default
-value for PowerShell files that excludes these two symbols. The intention of
-this change was to increase predictability, as double-clicking PowerShell
-symbols would now select the same portion that the extension highlights as well
-as align with collected user feedback.
+VS Code provides a default set of word separators, that is, characters that split words
+and so affect double-click selections. The editor's defaults include `-`, however we
+exclude `-` for PowerShell documents because unlike programming languages that use
+`CamelCase` or `snake_case`, PowerShell uses a `Verb-Noun` style where dashes are part of
+many symbol names (like underscores in other languages). So by excluding it we configure
+VS Code to treat `Verb-Noun` as one symbol/word, which matches what the extension
+semantically highlights when the cursor is placed within it.
-Different users have a variety of different preferences around these word
-selection settings and you can easily configure your own [word separators] in
-Visual Studio Code's settings.
+Users may also wish to set VS Code's integrated terminal's word separators (a separate
+setting) to exclude `-` to mirror the behavior in the terminal. This will apply to _all_
+terminals, not just PowerShell terminals.
-We exclude `-` by default because unlike programming languages that use
-`CamelCase` or `snake_case`, PowerShell uses a `Verb-Noun` style where dashes
-are part of many symbol names (like underscores in other languages). So by
-excluding it we configure Visual Studio Code to treat `Verb-Noun` as one
-symbol/word, which matches what the extension semantically highlights when the
-cursor is placed within it.
+```json
+"terminal.integrated.wordSeparators": " ()[]{}',\"`─"
+```
-We briefly excluded `$` by default too because PowerShell uses it as a prefix
-for variable substition, and many users were already excluding it. However, we
-could not find a strong consensus [#3378], so we reverted this exclusion.
+Different users have a variety of different preferences around these word selection
+settings and you can easily configure your own [word separators][] in VS Code's settings.
-To set the word separator behavior to separate words in PowerShell on `-` and
-`$` add the following entry to the Visual Studio Code's `settings.json`:
+To revert this behavior, add the following entry to the VS Code's `settings.json`:
```json
"[powershell]": {
@@ -51,26 +65,17 @@ To set the word separator behavior to separate words in PowerShell on `-` and
}
```
-This will cause `-` and `$` to register as word boundaries, meaning for example
-that double-clicking on a letter in `$MyVariable` will not select the `$` and on
-the `G` in `Get-Process` will only select `Get` rather than the verb and noun.
-
-Users may also wish to set Visual Studio Code's integrated terminal's word separators (a
-separate setting) to exclude `-` to mirror the behavior in the terminal. This will apply
-to _all_ terminals, not just PowerShell terminals.
-
-```json
-"terminal.integrated.wordSeparators": " ()[]{}',\"`─"
-```
+This will cause `-` to register as a word boundary, meaning for example on the `G` in
+`Get-Process` will only select `Get` rather than the verb and noun `Get-Process`.
## Problems with syntax highlighting
-PowerShell syntax highlighting is performed in combintation by the [PowerShell Extension]
-(semantic highlighting) and [Editor Syntax]. Syntax highlighting for VS Code, Atom,
+PowerShell syntax highlighting is performed in combination by the [PowerShell Extension][]
+(semantic highlighting) and [Editor Syntax][]. Syntax highlighting for VS Code, Atom,
SublimeText and even GitHub is provided by the [Editor Syntax] repository on GitHub.
-We introducted [Semantic Highlighting] in [v2021.2.2], a feature that applies tokenized
-colors at a layer above [Editor Syntax]. However, after [community feedback][#3221] and
+We introduced [Semantic Highlighting][] in [v2021.2.2], a feature that applies tokenized
+colors at a layer above [Editor Syntax][]. However, after [community feedback][#3221] and
multiple bug reports (including colors changing unexpectedly and [randomly][#3295]), we
have decided to disable it by default.
@@ -82,132 +87,140 @@ To enable semantic highlighting and use this "experimental" feature, set:
}
```
-If you enable it, you can customize the colors used for the various tokens. See [#3221]
+If you enable it, you can customize the colors used for the various tokens. See [#3221][]
for more info and to leave suggestions.
If it is disabled and your issue remains, then please open those syntax highlighting
-issues there in [Editor Syntax].
+issues there in [Editor Syntax][].
## Windows aren't appearing
-Due to an [issue](https://github.com/Microsoft/vscode/issues/42356) in Electron, windows
-spawned by Visual Studio Code (such as those for `Get-Credential`, `Connect-MsolService`,
-`Connect-AzAccount`, `Connect-AzureAd`, etc.) do not appear above Visual Studio Code.
+Due to a known issue in [Electron][], windows spawned by VS Code (such as those for
+`Get-Credential`, `Connect-MsolService`, `Connect-AzAccount`, `Connect-AzureAd`, etc.) do
+not appear above VS Code.
## Visual Studio Code is not working like the ISE
-The PowerShell extension does not aim to perfectly recreate
-the experience of the PowerShell ISE.
-However, we do want to support compatibility whenever possible
-to do so without breaking existing functionality.
+The [PowerShell Extension][] does not aim to perfectly recreate the experience of the
+PowerShell ISE. However, we do want to support compatibility whenever possible to do so
+without breaking existing functionality.
-Please see [the ISE compatibility doc](https://docs.microsoft.com/powershell/scripting/components/vscode/how-to-replicate-the-ise-experience-in-vscode)
-for ways to configure VSCode to be closer to the ISE.
+Please see the [ISE compatibility doc][] for ways to increase VS Code's similarity.
-Bear in mind that many of the UI/UX aspects of VSCode are driven by
-VSCode itself and can't be changed by the extension.
-The VSCode maintainers are quite reasonable though,
+Bear in mind that many of the UI/UX aspects of VS Code are driven by VS Code itself and
+can't be changed by the extension. The VS Code maintainers are quite reasonable though,
and you can ask for new features [in their repository](https://github.com/Microsoft/vscode).
## Known issues in the extension
-- If you are running the Preview version "PowerShell Preview" side-by-side with the stable version "PowerShell"
- you will experience performance and debug issues.
- This is expected until VSCode offers extension channels - [vscode#15756](https://github.com/Microsoft/vscode/issues/15756)
- - You MUST [DISABLE](https://code.visualstudio.com/docs/editor/extension-gallery#_disable-an-extension) one of them for the best performance.
- Docs on how to disable an extension can be found [here](https://code.visualstudio.com/docs/editor/extension-gallery#_disable-an-extension)
-- "The Language Service could not be started" but it does start with the x86 version of PowerShell
- - Do you use Avecto/BeyondSoft?
- We've received reports that Avecto, BeyondSoft
- and other privilege management software
- dramatically slow down the start up of Windows PowerShell x64.
- Please give the privilege management software feedback.
- For some,
- [updating to the latest version has fixed the issue](https://github.com/PowerShell/vscode-powershell/issues/2526#issuecomment-638329157).
-- IntelliSense is slow
- - This is a known issue that we've been chipping away at. There doesn't seem
- to be any one performance drain, but we've been trying to incrementally
- improve performance bit-by-bit everywhere. Currently we are focusing on [this issue](https://github.com/PowerShell/PowerShellEditorServices/issues/1295).
-- Variable renaming doesn't work properly - [#261]
- - PowerShell's usage of [dynamic scope] rather than [lexical scope]
- makes it [formally undecidable] to statically rename variables correctly
- (the only way to know for sure which `$x`s refer to the same variable is to
- run the PowerShell script).
+* If you are running the preview version "PowerShell Preview" side-by-side with the stable
+ version "PowerShell" you _will_ experience performance and debug issues. This is
+ expected until we adopt VS Code's extension channels in [#3716][].
+
+ * You MUST [DISABLE][] one of them.
+
+* "The Language Service could not be started" but it does start with the x86 version of
+ PowerShell.
+
+ * Do you use Avecto / BeyondSoft? We've received reports that Avecto, BeyondSoft and
+ other privilege management software dramatically slow down the start up of Windows
+ PowerShell x64. Please give the privilege management software feedback.
+
+* Variable renaming doesn't work properly, [#261].
+
+ * PowerShell's usage of [dynamic scope][] rather than [lexical scope][] makes it
+ [formally undecidable][] to statically rename variables correctly (the only way to
+ know for sure which `$x`s refer to the same variable is to run the PowerShell script).
However, like with many features, we attempt a best effort.
-- "Go to Definition" doesn't work through module imports - [#499]
- - Again this is a best-effort task.
-- Completions don't cycle when Tab is pressed like in the ISE - [#25]
- - [Use the tab comletion settings in VSCode](https://docs.microsoft.com/en-us/powershell/scripting/components/vscode/how-to-replicate-the-ise-experience-in-vscode?view=powershell-6#tab-completion)
-- My command that opens a dialog does nothing - [#410 (comment)]
- - Check that the dialog hasn't opened behind VSCode. This is a known
- [VSCode issue].
-- PowerShell classes don't have proper reference/symbol support - [#3]
- - One of the blockers for this was that we still supported Windows PowerShell v3 and v4. However, we don't support v3 and v4 anymore so we can do this work but it's not on the roadmap at this time.
-- Document formatting takes a long time - [#984]
- - Document formatting is provided by [PSScriptAnalyzer], but there
- may be opportunities to improve our integration with it in the
- [PowerShell Extension] too.
-- PSReadLine throws an error ever so often - [#3701](https://github.com/PowerShell/vscode-powershell/issues/3701)
- - This is a known issue due to the PowerShell eventing framework running registered
+
+* "Go to Definition" doesn't work through module imports, [#499].
+
+ * Again this is a best-effort task.
+
+* Completions don't cycle when Tab is pressed like in the ISE, [#25].
+
+ * Use the tab completion settings recommended in the [ISE compatibility doc][].
+
+* My command that opens a dialog does nothing, [#410 (comment)][].
+
+ * Check that the dialog hasn't opened behind VS Code. This is a known issue in
+ [Electron][], the framework used by VS Code.
+
+* PowerShell classes don't have proper reference / symbol support, [#3][].
+
+ * One of the blockers for this was that we still supported Windows PowerShell v3 and v4.
+ However, we don't support v3 and v4 anymore so we can do this work but it's not on the
+ roadmap at this time.
+
+* Document formatting takes a long time, [#984][].
+
+ * Document formatting is provided by [PSScriptAnalyzer][], but there may be
+ opportunities to improve our integration with it in the extension too.
+
+* PSReadLine throws an error ever so often, [#3701][].
+
+ * This is a known issue due to the PowerShell eventing framework running registered
`OnIdle` events outside of PowerShell Editor Service's dedicated PowerShell execution
pipeline. Until we can disable event registration, you will need to avoid registering
events in the first place.
- - A known work around includes unregistering from this event.
- `Get-EventSubscriber -Force -SourceIdentifier PowerShell.OnIdle -EA 0 | Unregister-Event -Force`
- can be run manually (or added to your profile) to avoid this bug.
- * Related issues: [PowerShell Editor Services #1591](https://github.com/PowerShell/PowerShellEditorServices/issues/1591),
+
+ * A known work around includes unregistering from this event. `Get-EventSubscriber
+ -Force -SourceIdentifier PowerShell.OnIdle -EA 0 | Unregister-Event -Force` can be run
+ manually (or added to your profile) to avoid this bug.
+
+ * Also see: [PowerShell Editor Services #1591](https://github.com/PowerShell/PowerShellEditorServices/issues/1591),
[PSReadLine #3091](https://github.com/PowerShell/PSReadLine/issues/3091),
- [Azure PowerShell #16585](https://github.com/Azure/azure-powershell/issues/16586)
+ and [Azure PowerShell #16585](https://github.com/Azure/azure-powershell/issues/16586).
## Reporting an issue
-If you experience a problem with the [PowerShell Extension]:
+If you experience a problem with the PowerShell Extension:
+
+1. Search through [existing issues][] on GitHub.
+
+ In some circumstances, an issue may already be closed due to a fix being merged but not
+ yet released - so be sure to quickly check closed issues as well.
+
+2. Most features are provided by the client-agnostic [PowerShell Editor Services][]
+ backend project that the extension leverages, so it's also worth a [look there][].
-1. Search through [existing issues] on GitHub.
- In some circumstances, an issue may already be closed due to
- a fix being merged but not yet released - so be sure to quickly
- check closed issues as well.
-2. Most features are provided by the client-agnostic [PowerShell Editor Services]
- backend project that the extension leverages, so it's also worth a
- [look there].
-3. If you don't see the issue you're experiencing, please [open a new issue].
+3. If you don't see the issue you're experiencing, please [open a new issue][].
## Opening a new issue
-If you experience an issue with the [PowerShell Extension] and can't find
-an existing issue for it, [open an issue on us on GitHub].
+If you experience an issue with the PowerShell Extension and can't find an existing issue
+for it, [open a new issue][].
-You can also open an issue directly from VSCode by entering the
-[Command Palette] with Ctrl+Shift+P
-(Cmd+Shift+P on macOS) and running the
-`PowerShell: Upload Bug Report to GitHub` command.
+You can also open an issue directly from VS Code by entering the [Command Palette][] with
+Ctrl+Shift+P
+(Cmd+Shift+P on macOS) and running the `PowerShell:
+Upload Bug Report to GitHub` command.
When opening an issue, keep in mind:
-- The fastest way to fixing a bug is reproducing it, and reproducing it
- is easier with [more information].
-- The issue templates are designed to help you provide all the information
- needed to solve your issue
-- As Free and Open Source Software, the [PowerShell Extension] thrives on
- the contributions of community members — if you're interested in
- [tackling an issue], we always accept contributions and will help you
- at every step.
+* The fastest way to fixing a bug is reproducing it, and reproducing it
+ is easier with [more information][].
+
+* The issue templates are designed to help you provide all the information needed to solve
+ your issue, please fill out the entire questionnaire.
+
+* As Open Source Software the [PowerShell Extension][] thrives on the contributions of
+ community members! If you're interested in [tackling an issue][], we love accepting
+ contributions and will help you at every step.
## Reproducing the issue
-To fix the issue, we need to be able to reproduce it.
-To do that, we need:
+To fix the issue, we need to be able to reproduce it. To do that, we need:
-- A small/minimal script or sequence of user steps that result in the problem occurring.
-- A description of the behavior you are expecting.
-- A description of the actual behavior that occurs.
+* A small/minimal script or sequence of user steps that result in the problem occurring.
+* A description of the behavior you are expecting.
+* A description of the actual behavior that occurs.
-In some cases, a GIF of the issue occuring is also very helpful.
+In some cases, a GIF of the issue occurring is also very helpful.
-When you open a new issue,
-the GitHub issue template will have sections
-to guide you through providing all of this information
-as well as environment information discussed below.
+When you open a new issue, the GitHub issue template will have sections to guide you
+through providing all of this information as well as environment information discussed
+below.
## Providing information about your environment
@@ -215,150 +228,119 @@ For solving most issues, the following information is important to provide:
### Logs
-Logs provide context for what was happening when the issue occurred.
-**Note: You should skim through your logs for any sensitive information you would not like to share online**
+Logs provide context for what was happening when the issue occurred. **You should browse
+your logs for any sensitive information you would not like to share online!**
-- Before sending through logs, try and reproduce the issue with
- **log level set to Diagnostic**. You can set this
- in the [VSCode Settings] (Ctrl+,) with:
+* Before sending through logs, try and reproduce the issue with **log level set to
+ Diagnostic**. You can set this in the [VS Code Settings][]
+ (Ctrl+,) with:
```json
"powershell.developer.editorServicesLogLevel": "Diagnostic"
```
- After you have captured the issue with the log level turned up,
- you may want to return it (since verbose logging can use disk space):
+* After you have captured the issue with the log level turned up, you may want to return
+ it (since verbose logging can use disk space):
```json
"powershell.developer.editorServicesLogLevel": "Normal"
```
- Logs are located at
+* Logs are located at
+ `~/.vscode[-insiders]/extensions/ms-vscode.powershell[-preview]-/logs`.
+ For example: `~/.vscode/extensions/ms-vscode.powershell-2019.5.1/logs`.
- ```powershell
- $HOME/.vscode[-insiders]/extensions/ms-vscode.powershell-/logs/
- ```
+* In VS Code you can open and read the logs directly from the [Command Palette][]
+ (Ctrl+Shift+P) with `PowerShell: Open PowerShell
+ Extension Logs Folder`.
- or if you're using the preview version of the extension
+ > NOTE: Don't forget to also attach the [Language Server Protocol payload
+ > logs](#provide-language-server-protocol-payload-logs)!
- ```powershell
- $HOME/.vscode[-insiders]/extensions/ms-vscode.powershell-preview-/logs/
- ```
-
- For example:
-
- ```powershell
- $HOME/vscode/extensions/ms-vscode.powershell-2019.5.1/logs
- ```
+* You can attach your logs to an issue by zipping them and dragging and dropping them onto
+ your open issue description in the browser.
-- In VSCode you can open and read the logs directly from the [Command Palette]
- (Ctrl+Shift+P)
- with `PowerShell: Open PowerShell Extension Logs Folder`.
-
-> NOTE: Don't forget to also attach the [Language Server Protocol payload logs](#provide-language-server-protocol-payload-logs)!
-
-- You can attach your logs to an issue by zipping them and drag/dropping
- them onto your open issue description in the browser.
-
-- If you prefer to share your logs privately, you can send them to
- vscode-powershell@microsoft.com. Please still open an issue though
- so we can track the work — other users may have the same issue.
+* If you prefer to share your logs privately, you can send them to
+ . **Please still open an issue though so we can track
+ the work, and reference it in your email.**
#### Provide Language Server Protocol payload logs
-The PowerShell extension works mostly from sending and receiving messages from [PowerShell Editor Services](httos://github.com/PowerShell/PowerShellEditorServices).
-In some cases, getting to the bottom of a bug will require looking at the payloads of these messages. To do this:
+The extension works mostly from exchanging messages with [PowerShell Editor Services][].
+In some cases, getting to the bottom of a bug will require looking at the payloads of
+these messages. To do this:
-- Add the following setting to your settings file:
+* Add the following setting to your settings file:
```json
"powershell editor services.trace.server":"verbose"
```
-> NOTE: While VSCode will not recognize and highlight it, it is a valid option and enables tracer logs on the server.
+> While VS Code will not recognize and highlight it, it is a valid option and enables
+> tracer logs on the server.
-- Restart Visual Studio Code and reproduce the issue.
+* Restart VS Code and reproduce the issue.
-- Go into the "Output" panel (Ctrl+Shift+U or Cmd+Shift+U).
+* Go into the "Output" panel (Ctrl+Shift+U or
+ Cmd+Shift+U).
-- In the drop down on the right, select "PowerShell Editor Services".
+* In the drop down on the right, select "PowerShell Editor Services".
-- Copy the entire contents of the Output panel and paste it into the GitHub issue in the browser.
-At this point, you may delete the setting if you want.
+* Copy the entire contents of the Output panel and paste it into the GitHub issue in the
+ browser. At this point, you may delete the setting if you want.
-- Again, if you prefer to share your logs privately, you can send them to
- vscode-powershell@microsoft.com. Please still open an issue though
- so we can track the work — other users may have the same issue.
+* Again, if you prefer to share your logs privately, you can send them to
+ . **Please still open an issue though so we can track
+ the work, and reference it in your email.**
### Visual Studio Code version
-[Your VSCode version] can be obtained from the Integrated Console
-or PowerShell like this:
+[Your VS Code version][] can be obtained from the Integrated Console or any terminal:
-```shell
-code -v
+```powershell
+code --version
```
-If you are using VSCode Insiders, use this command:
-
-```shell
-code-insiders -v
-```
+If you are using VS Code Insiders, substitute `code-insiders` for `code`.
You should get an output like:
```text
-1.27.0
-493869ee8e8a846b0855873886fc79d480d342de
-x64
+1.57.1
+507ce72a4466fbb27b715c3722558bb15afa9f48
+arm64
```
-If VSCode is not on your path, you will get a message like
+If VS Code is not on your path, you will get a message like:
```text
code: The term 'code' is not recognized as the name of a cmdlet, ...
```
-in this case, use the file menu in VSCode and choose `Help`>`About`
-(or `Code`>`About Visual Studio Code` on macOS) to get version information.
+In this case, use the file menu in VS Code and choose `Help` > `About` (or `Code` > `About
+Visual Studio Code` on macOS) to get version information.
### PowerShell extension version
-[Your installed PowerShell Extension version] can similarly be found with:
+[Your installed PowerShell Extension version][] can similarly be found with:
-```shell
-code --list-extensions --show-versions
-```
-
-With VSCode Insiders:
-
-```shell
-code-insiders --list-extensions --show-versions
+```powershell
+code --list-extensions --show-versions | Select-String powershell
```
You should get an output like:
```text
-DavidAnson.vscode-markdownlint@0.20.0
-eamodio.gitlens@8.5.6
-EditorConfig.EditorConfig@0.12.4
-jchannon.csharpextensions@1.3.0
-k--kato.docomment@0.1.2
-ms-vscode.cpptools@0.18.1
-ms-dotnettools.csharp@1.12.13
-ms-vscode.PowerShell@2.0.0
-twxs.cmake@0.0.17
-vscodevim.vim@0.16.5
+ms-vscode.powershell@2021.8.0
```
-If VSCode isn't on your path use the [Command Palette]
-(Ctrl+Shift+P) to enter
-`Extensions: Show Installed Extensions` and list your extensions.
+If VS Code isn't on your path, use the [Command Palette][]
+(Ctrl+Shift+P) to run `Extensions: Show Installed
+Extensions` and list your extensions.
### Editor Services version
-To get the [PowerShell Editor Services] version, in the Integrated
-Console, enter:
+To get the [PowerShell Editor Services][] version, in the Integrated Console, enter:
```powershell
> $psEditor.EditorServicesVersion
@@ -369,18 +351,20 @@ Major Minor Build Revision
### PowerShell version table
-You can get [your PowerShell version table] from the Integrated Console:
+You can get [your PowerShell version table][] from the Integrated Console through the
+variable `$PSVersionTable`:
```powershell
-> $PSVersionTable
+PS> $PSVersionTable
+
Name Value
---- -----
-PSVersion 6.1.0
+PSVersion 7.1.3
PSEdition Core
-GitCommitId 6.1.0
-OS Microsoft Windows 10.0.18242
-Platform Win32NT
-PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
+GitCommitId 7.1.3
+OS Darwin 20.4.0 Darwin Kernel
+Platform Unix
+PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
@@ -388,20 +372,9 @@ WSManStackVersion 3.0
### Operating system information
-- Windows - all needed information should already be in the `$PSVersionTable`
-- macOS
- - Your macOS version (e.g. High Sierra 10.13.6)
-- Linux
- - `uname -a`
- - Your distro and version (usually `lsb_release -a` is the best here)
-
-### Note on security
-
-If you believe there is a security vulnerability in the [PowerShell Extension]
-(or in [PowerShell Editor Services]), it **must** be reported directly to
-secure@microsoft.com to allow for [Coordinated Vulnerability Disclosure].
-**Only** open an issue if secure@microsoft.com has confirmed that filing
-an issue on GitHub is appropriate.
+* Windows: all needed information should already be in the `$PSVersionTable`.
+* macOS: your macOS version (e.g. High Sierra 10.13.6).
+* Linux: Use `uname -a` and and `lsb_release -a`.
[Editor Syntax]: https://github.com/PowerShell/EditorSyntax
[PowerShell Editor Services]: https://github.com/PowerShell/PowerShellEditorServices
@@ -411,28 +384,31 @@ an issue on GitHub is appropriate.
[Command Palette]: https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette
[Coordinated Vulnerability Disclosure]: https://technet.microsoft.com/security/dn467923
[custom host]: https://docs.microsoft.com/en-us/powershell/developer/hosting/custom-host-samples
+[DISABLE]: https://code.visualstudio.com/docs/editor/extension-gallery#_disable-an-extension
[dynamic scope]: http://ig2600.blogspot.com/2010/01/powershell-is-dynamically-scoped-and.html
+[Electron]: https://github.com/Microsoft/vscode/issues/42356
[existing issues]: https://github.com/PowerShell/vscode-powershell/issues
[formally undecidable]: https://en.wikipedia.org/wiki/Undecidable_problem
+[ISE compatibility doc]: https://docs.microsoft.com/powershell/scripting/components/vscode/how-to-replicate-the-ise-experience-in-vscode
+[language status item API]: https://code.visualstudio.com/updates/v1_65#_language-status-items
[lexical scope]: https://stackoverflow.com/questions/1047454/what-is-lexical-scope
[look there]: https://github.com/PowerShell/PowerShellEditorServices/issues
[more information]: #providing-information-about-your-environment
[open an issue]: https://github.com/PowerShell/vscode-powershell/issues/new/choose
[open a new issue]: #opening-a-new-issue
[open an issue there]: https://github.com/PowerShell/PSScriptAnalyzer/issues/new/choose
-[open an issue on us on GitHub]: https://github.com/PowerShell/vscode-powershell/issues/new/choose
+[PowerShell Core 7.2]: https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.2
[Reporting Problems]: ../README.md#reporting-problems
[semantic highlighting]: https://code.visualstudio.com/api/language-extensions/semantic-highlight-guide
[tackling an issue]: ./development.md
[v2021.2.2]: https://github.com/PowerShell/vscode-powershell/releases/tag/v2021.2.2
-[v2021.5.1]: https://github.com/PowerShell/vscode-powershell/releases/tag/v2021.5.1
-[VSCode issue]: https://github.com/Microsoft/vscode/issues/42356
-[VSCode Settings]: https://code.visualstudio.com/docs/getstarted/settings
+[VS Code Settings]: https://code.visualstudio.com/docs/getstarted/settings
[will break this compatibility]: https://github.com/PowerShell/vscode-powershell/issues/1310
+[WMF 5.1]: https://docs.microsoft.com/en-us/powershell/scripting/windows-powershell/wmf/setup/install-configure
[word separators]: https://stackoverflow.com/questions/31632351/visual-studio-code-customizing-word-separators
[Your installed PowerShell Extension version]: https://code.visualstudio.com/docs/editor/extension-gallery#_list-installed-extensions
[your PowerShell version table]: http://www.powertheshell.com/topic/learnpowershell/firststeps/psversion/
-[Your VSCode version]: https://code.visualstudio.com/docs/supporting/FAQ#_how-do-i-find-the-vs-code-version
+[Your VS Code version]: https://code.visualstudio.com/docs/supporting/FAQ#_how-do-i-find-the-vs-code-version
[#3]: https://github.com/PowerShell/vscode-powershell/issues/3
[#25]: https://github.com/PowerShell/vscode-powershell/issues/25
@@ -444,6 +420,9 @@ an issue on GitHub is appropriate.
[#550]: https://github.com/PowerShell/vscode-powershell/issues/550
[#647]: https://github.com/PowerShell/vscode-powershell/issues/647
[#984]: https://github.com/PowerShell/vscode-powershell/issues/984
+[#2571]: https://github.com/PowerShell/vscode-powershell/issues/2572
[#3221]: https://github.com/PowerShell/vscode-powershell/issues/3221#issuecomment-810563456
[#3295]: https://github.com/PowerShell/vscode-powershell/issues/3295
[#3378]: https://github.com/PowerShell/vscode-powershell/issues/3378
+[#3701]: https://github.com/PowerShell/vscode-powershell/issues/3701
+[#3716]: https://github.com/PowerShell/vscode-powershell/issues/3716