Skip to content

Commit bdab072

Browse files
Update readme and troubleshooting docs (#4549)
1 parent 0f33492 commit bdab072

File tree

2 files changed

+48
-46
lines changed

2 files changed

+48
-46
lines changed

README.md

+9-5
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,23 @@ select "PowerShell ISE" for a fun and familiar experience.
2525

2626
The extension _should_ work anywhere VS Code itself and PowerShell Core 7.2 or higher is
2727
[supported][]. For Windows PowerShell, only version 5.1 is supported. Please note that
28-
PowerShell Core 6 is end-of-life and so not supported. Our test matrix includes the
28+
PowerShell Core 6, 7.0, and 7.1 have reached end-of-support. Our test matrix includes the
2929
following:
3030

31-
- **Windows Server 2022** with Windows PowerShell 5.1 and PowerShell Core 7.2.7
32-
- **Windows Server 2019** with Windows PowerShell 5.1 and PowerShell Core 7.2.7
33-
- **macOS 11** with PowerShell Core 7.2.7
34-
- **Ubuntu 20.04** with PowerShell Core 7.2.7
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
3535

3636
[supported]: https://docs.microsoft.com/en-us/powershell/scripting/powershell-support-lifecycle
3737

3838
Read the [installation instructions](https://docs.microsoft.com/en-us/powershell/scripting/components/vscode/using-vscode)
3939
to get more details on how to use the extension on these platforms.
4040

41+
For Windows PowerShell 5.1, [.NET Framework 4.8][dotnet-framework] or higher is required.
42+
43+
[dotnet-framework]: https://dotnet.microsoft.com/en-us/download/dotnet-framework
44+
4145
**Read the [troubleshooting guide](./docs/troubleshooting.md) for answers to common questions.**
4246

4347
## Features

docs/troubleshooting.md

+39-41
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ This document contains troubleshooting steps for commonly reported issues when u
55

66
## How do I change the PowerShell version?
77

8-
Starting VS Code 1.65, extensions now use the [language status item API][]
9-
instead of manually adding a button to the status bar. That means the PowerShell icon
10-
button in the status bar now exists under the language status menu, which looks like:
11-
`{}`. You can then pin the icon back to the status bar by hovering over that menu and
12-
clicking the pin button. The PowerShell icon will show you the current session's version,
13-
and clicking it will let you change to another session.
8+
Starting VS Code 1.65, extensions now use the [language status item API][] instead of
9+
manually adding a button to the status bar. That means the PowerShell icon button in the
10+
status bar now exists under the language status menu, which looks like: `{}`. You can then
11+
pin the icon back to the status bar by hovering over that menu and clicking the pin
12+
button. The PowerShell icon will show you the current session's version, and clicking it
13+
will let you change to another session. The language status icon will only appear when the
14+
active editor's language mode is PowerShell.
1415

1516
### Using Windows PowerShell 5.1
1617

@@ -20,7 +21,7 @@ major versions behind and in maintenance mode, Windows PowerShell is missing man
2021
bug fixes and APIs we use to make the extension experience great. So please, if you can,
2122
use PowerShell Core. That said, when using Windows PowerShell on older versions of the
2223
Windows operating system, if the extension is failing to start (e.g. [#2571][]), try
23-
installing [WMF 5.1][].
24+
installing [WMF 5.1][] and [.NET Framework 4.8][dotnet-framework].
2425

2526
## How do I debug my PowerShell script?
2627

@@ -85,9 +86,9 @@ This will cause `-` to register as a word boundary, meaning for example on the `
8586

8687
PowerShell syntax highlighting is performed in combination by the [PowerShell Extension][]
8788
(semantic highlighting) and [Editor Syntax][]. Syntax highlighting for VS Code, Atom,
88-
SublimeText and even GitHub is provided by the [Editor Syntax] repository on GitHub.
89+
SublimeText and even GitHub is provided by the [Editor Syntax][] repository on GitHub.
8990

90-
We introduced [Semantic Highlighting][] in [v2021.2.2], a feature that applies tokenized
91+
We introduced [Semantic Highlighting][] in [v2021.2.2][], a feature that applies tokenized
9192
colors at a layer above [Editor Syntax][]. However, after [community feedback][#3221] and
9293
multiple bug reports (including colors changing unexpectedly and [randomly][#3295]), we
9394
have decided to disable it by default.
@@ -96,7 +97,7 @@ To enable semantic highlighting and use this "experimental" feature, set:
9697

9798
```json
9899
"[powershell]": {
99-
"editor.semanticHighlighting.enabled": false
100+
"editor.semanticHighlighting.enabled": true
100101
}
101102
```
102103

@@ -110,7 +111,8 @@ issues there in [Editor Syntax][].
110111

111112
Due to a known issue in [Electron][], windows spawned by VS Code (such as those for
112113
`Get-Credential`, `Connect-MsolService`, `Connect-AzAccount`, `Connect-AzureAd`, etc.) do
113-
not appear above VS Code.
114+
not appear above VS Code. Use <kbd>Alt</kbd>+<kbd>Tab</kbd> on Windows or
115+
<kbd>Cmd</kbd>+<kbd>Tab</kbd> on macOS to switch to the other window.
114116

115117
## Visual Studio Code is not working like the ISE
116118

@@ -126,11 +128,12 @@ and you can ask for new features [in their repository](https://github.com/Micros
126128

127129
## Known issues in the extension
128130

129-
* If you are running the preview version "PowerShell Preview" side-by-side with the stable
130-
version "PowerShell" you _will_ experience performance and debug issues. This is
131-
expected until we adopt VS Code's extension channels in [#3716][].
131+
* "CorruptZip: end of central directory record signature not found" when installing the
132+
extension, [#4474][].
132133

133-
* You MUST [DISABLE][] one of them.
134+
* Unfortunately it appears that a common corporate VPN with a firewall by Palo Alto is
135+
disrupting the download of the extension binary from the VS Code marketplace. Please
136+
reach out to your network administrators about this.
134137

135138
* "The Language Service could not be started" but it does start with the x86 version of
136139
PowerShell.
@@ -139,18 +142,29 @@ and you can ask for new features [in their repository](https://github.com/Micros
139142
other privilege management software dramatically slow down the start up of Windows
140143
PowerShell x64. Please give the privilege management software feedback.
141144

142-
* Variable renaming doesn't work properly, [#261].
145+
* `Write-Output` is broken in Windows PowerShell 5.1, [#3991][].
146+
147+
* We seem to have recently narrowed this down! If `Start-Transcript` has been called
148+
within the Extension Terminal, say in your PowerShell profile, this will eventually
149+
cause output to no longer appear. Please try removing the call to `Start-Transcript`
150+
and restarting the extension. We are investigating a fix.
151+
152+
* Variable renaming doesn't work as expected, [#261][].
143153

144154
* PowerShell's usage of [dynamic scope][] rather than [lexical scope][] makes it
145155
[formally undecidable][] to statically rename variables correctly (the only way to
146156
know for sure which `$x`s refer to the same variable is to run the PowerShell script).
147157
However, like with many features, we attempt a best effort.
148158

149-
* "Go to Definition" doesn't work through module imports, [#499].
159+
* `$PSScriptRoot` is not populated when running a code block (via F8), [#633][].
150160

151-
* Again this is a best-effort task.
161+
* This is by design. The value of `$PSScriptRoot` is only populated by PowerShell when
162+
the caller is a script. Since <kbd>F8</kbd> or "Run Selection" is essentially
163+
copy-pasting the selection into the terminal, it's behavior is the same as if you the
164+
user pasted it. That is, it's a block of code and not a script file, and therefore
165+
there is no relevant context to populate `$PSScriptRoot`.
152166

153-
* Completions don't cycle when <kbd>Tab</kbd> is pressed like in the ISE, [#25].
167+
* Completions don't cycle when <kbd>Tab</kbd> is pressed like in the ISE, [#25][].
154168

155169
* Use the tab completion settings recommended in the [ISE compatibility doc][].
156170

@@ -159,12 +173,6 @@ and you can ask for new features [in their repository](https://github.com/Micros
159173
* Check that the dialog hasn't opened behind VS Code. This is a known issue in
160174
[Electron][], the framework used by VS Code.
161175

162-
* PowerShell classes don't have proper reference / symbol support, [#3][].
163-
164-
* One of the blockers for this was that we still supported Windows PowerShell v3 and v4.
165-
However, we don't support v3 and v4 anymore so we can do this work but it's not on the
166-
roadmap at this time.
167-
168176
* Document formatting takes a long time, [#984][].
169177

170178
* Document formatting is provided by [PSScriptAnalyzer][], but there may be
@@ -231,7 +239,7 @@ To fix the issue, we need to be able to reproduce it. To do that, we need:
231239

232240
In some cases, a GIF of the issue occurring is also very helpful.
233241

234-
When you open a new issue, the GitHub issue template will have sections to guide you
242+
When you [open a new issue][], the GitHub issue template will have sections to guide you
235243
through providing all of this information as well as environment information discussed
236244
below.
237245

@@ -395,9 +403,6 @@ WSManStackVersion 3.0
395403
[PSScriptAnalyzer]: https://github.com/PowerShell/PSScriptAnalyzer
396404

397405
[Command Palette]: https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette
398-
[Coordinated Vulnerability Disclosure]: https://technet.microsoft.com/security/dn467923
399-
[custom host]: https://docs.microsoft.com/en-us/powershell/developer/hosting/custom-host-samples
400-
[DISABLE]: https://code.visualstudio.com/docs/editor/extension-gallery#_disable-an-extension
401406
[dynamic scope]: http://ig2600.blogspot.com/2010/01/powershell-is-dynamically-scoped-and.html
402407
[Electron]: https://github.com/Microsoft/vscode/issues/42356
403408
[existing issues]: https://github.com/PowerShell/vscode-powershell/issues
@@ -407,35 +412,28 @@ WSManStackVersion 3.0
407412
[lexical scope]: https://stackoverflow.com/questions/1047454/what-is-lexical-scope
408413
[look there]: https://github.com/PowerShell/PowerShellEditorServices/issues
409414
[more information]: #providing-information-about-your-environment
410-
[open an issue]: https://github.com/PowerShell/vscode-powershell/issues/new/choose
411-
[open a new issue]: #opening-a-new-issue
415+
[open a new issue]: https://github.com/PowerShell/vscode-powershell/issues/new/choose
412416
[open an issue there]: https://github.com/PowerShell/PSScriptAnalyzer/issues/new/choose
413417
[PowerShell Core 7.2]: https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.2
414-
[Reporting Problems]: ../README.md#reporting-problems
415418
[semantic highlighting]: https://code.visualstudio.com/api/language-extensions/semantic-highlight-guide
416419
[tackling an issue]: ./development.md
417420
[v2021.2.2]: https://github.com/PowerShell/vscode-powershell/releases/tag/v2021.2.2
418421
[VS Code Settings]: https://code.visualstudio.com/docs/getstarted/settings
419-
[will break this compatibility]: https://github.com/PowerShell/vscode-powershell/issues/1310
420422
[WMF 5.1]: https://docs.microsoft.com/en-us/powershell/scripting/windows-powershell/wmf/setup/install-configure
423+
[dotnet-framework]: https://dotnet.microsoft.com/en-us/download/dotnet-framework
421424
[word separators]: https://stackoverflow.com/questions/31632351/visual-studio-code-customizing-word-separators
422425
[Your installed PowerShell Extension version]: https://code.visualstudio.com/docs/editor/extension-gallery#_list-installed-extensions
423426
[your PowerShell version table]: http://www.powertheshell.com/topic/learnpowershell/firststeps/psversion/
424427
[Your VS Code version]: https://code.visualstudio.com/docs/supporting/FAQ#_how-do-i-find-the-vs-code-version
425428

426-
[#3]: https://github.com/PowerShell/vscode-powershell/issues/3
427429
[#25]: https://github.com/PowerShell/vscode-powershell/issues/25
428-
[#140]: https://github.com/PowerShell/vscode-powershell/issues/140
430+
[#4474]: https://github.com/PowerShell/vscode-powershell/issues/4474
431+
[#3991]: https://github.com/PowerShell/vscode-powershell/issues/3991
429432
[#261]: https://github.com/PowerShell/vscode-powershell/issues/261
430433
[#410 (comment)]: https://github.com/PowerShell/vscode-powershell/issues/410#issuecomment-397531817
431-
[#499]: https://github.com/PowerShell/vscode-powershell/issues/499
432-
[#535]: https://github.com/PowerShell/vscode-powershell/issues/535
433-
[#550]: https://github.com/PowerShell/vscode-powershell/issues/550
434-
[#647]: https://github.com/PowerShell/vscode-powershell/issues/647
435434
[#984]: https://github.com/PowerShell/vscode-powershell/issues/984
436435
[#2571]: https://github.com/PowerShell/vscode-powershell/issues/2572
437436
[#3221]: https://github.com/PowerShell/vscode-powershell/issues/3221#issuecomment-810563456
438437
[#3295]: https://github.com/PowerShell/vscode-powershell/issues/3295
439-
[#3378]: https://github.com/PowerShell/vscode-powershell/issues/3378
440438
[#3701]: https://github.com/PowerShell/vscode-powershell/issues/3701
441-
[#3716]: https://github.com/PowerShell/vscode-powershell/issues/3716
439+
[#633]: https://github.com/PowerShell/vscode-powershell/issues/633

0 commit comments

Comments
 (0)