Skip to content

Commit 93cb1c4

Browse files
Note that ISE theme is included in this extension (#3372)
2 parents 0b8afd0 + d5b90d0 commit 93cb1c4

File tree

2 files changed

+54
-30
lines changed

2 files changed

+54
-30
lines changed

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ This leverages the
1616
[Language Server Protocol](https://microsoft.github.io/language-server-protocol/)
1717
where `PowerShellEditorServices` is the server and `vscode-powershell` is the client.
1818

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.
23+
1924
## Platform support
2025

2126
- **Windows 7 through 10** with Windows PowerShell v3 and higher, and PowerShell Core
@@ -25,7 +30,7 @@ where `PowerShellEditorServices` is the server and `vscode-powershell` is the cl
2530
Read the [installation instructions](https://docs.microsoft.com/en-us/powershell/scripting/components/vscode/using-vscode)
2631
to get more details on how to use the extension on these platforms.
2732

28-
Read the [FAQ](https://github.com/PowerShell/vscode-powershell/wiki/FAQ) for answers to common questions.
33+
Read the [troubleshooting guide](./docs/troubleshooting.md) for answers to common questions.
2934

3035
## Features
3136

@@ -38,18 +43,20 @@ Read the [FAQ](https://github.com/PowerShell/vscode-powershell/wiki/FAQ) for ans
3843
- Document and workspace symbol discovery
3944
- Run selected selection of PowerShell code using <kbd>F8</kbd>
4045
- Launch online help for the symbol under the cursor using <kbd>Ctrl</kbd>+<kbd>F1</kbd>
41-
- Local script debugging and basic interactive console support!
46+
- Local script debugging
47+
- Integrated console support
48+
- PowerShell ISE color theme
4249

4350
## Installing the Extension
4451

4552
You can install the official release of the PowerShell extension by following the steps
4653
in the [Visual Studio Code documentation](https://code.visualstudio.com/docs/editor/extension-gallery).
47-
In the Extensions pane, search for "PowerShell" extension and install it there. You will
54+
In the Extensions pane, search for "PowerShell" extension and install it there. You will
4855
get notified automatically about any future extension updates!
4956

5057
You can also install a VSIX package from our [Releases page](https://github.com/PowerShell/vscode-powershell/releases) by following the
5158
[Install from a VSIX](https://code.visualstudio.com/docs/editor/extension-gallery#_install-from-a-vsix)
52-
instructions. The easiest way is through the command line:
59+
instructions. The easiest way is through the command line:
5360

5461
```powershell
5562
code --install-extension PowerShell-<version>.vsix

docs/troubleshooting.md

Lines changed: 43 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,30 @@
33
This document contains troubleshooting steps for commonly reported issues when using the
44
[PowerShell Extension] for Visual Studio Code.
55

6-
## Script Analysis is Reporting False Errors
6+
## How do I debug my PowerShell script?
77

8-
Script analysis is provided by the [PSScriptAnalyzer] project on GitHub.
9-
Please [open an issue there] if you are getting fault script diagnostics
10-
(red and green squiggly lines under PowerShell in scripts).
8+
This topic is best covered in the "Debugging PowerShell Script in Visual Studio Code"
9+
Scripting Guys blog posts (thanks community!):
1110

12-
## Problems with Syntax Highlighting
11+
* [Part 1](https://blogs.technet.microsoft.com/heyscriptingguy/2017/02/06/debugging-powershell-script-in-visual-studio-code-part-1/)
12+
* [Part 2](https://blogs.technet.microsoft.com/heyscriptingguy/2017/02/13/debugging-powershell-script-in-visual-studio-code-part-2/)
1313

14-
PowerShell syntax highlighting is not performed by the [PowerShell Extension].
15-
Instead syntax highlighting for VSCode, Atom, SublimeText and even GitHub is
16-
provided by the [Editor Syntax] repository on GitHub. Please open any
17-
[syntax highlighting issues there].
14+
## Script analysis is reporting false errors
1815

19-
However, with the introduction of [Semantic Highlighting] in [v2021.2.2], the
20-
chosen colors may be different because this is applied at a layer above [Editor
21-
Syntax]. To disable semantic highlighting and so restore the colors as they
22-
were, set:
16+
Script analysis is provided by the [PSScriptAnalyzer] project on GitHub. If the warning
17+
message starts with `[PSScriptAnalyzer]` or if you are getting faulty script diagnostics
18+
(red and green squiggly lines under PowerShell in scripts) please [open an issue there].
19+
20+
## Problems with syntax highlighting
21+
22+
PowerShell syntax highlighting is performed in combintation by the [PowerShell Extension]
23+
(semantic highlighting) and [Editor Syntax]. Syntax highlighting for VS Code, Atom,
24+
SublimeText and even GitHub is provided by the [Editor Syntax] repository on GitHub.
25+
26+
With the introduction of [Semantic Highlighting] in [v2021.2.2], the chosen colors may be
27+
different because this is applied at a layer above [Editor Syntax]. To disable semantic
28+
highlighting and so restore the colors as they were and rely solely on [Editor Syntax],
29+
set:
2330

2431
```json
2532
"[powershell]": {
@@ -30,7 +37,16 @@ were, set:
3037
If you leave it enabled, you can customize the colors used for the various
3138
tokens. See [#3221] for more info and to leave suggestions.
3239

33-
## VSCode is not working like the ISE
40+
If you disable it and your issue remains, then please open those [syntax highlighting
41+
issues there].
42+
43+
## Windows aren't appearing
44+
45+
Due to an [issue](https://github.com/Microsoft/vscode/issues/42356) in Electron, windows
46+
spawned by Visual Studio Code (such as those for `Get-Credential`, `Connect-MsolService`,
47+
`Connect-AzAccount`, `Connect-AzureAd`, etc.) do not appear above Visual Studio Code.
48+
49+
## Visual Studio Code is not working like the ISE
3450

3551
The PowerShell extension does not aim to perfectly recreate
3652
the experience of the PowerShell ISE.
@@ -45,7 +61,7 @@ VSCode itself and can't be changed by the extension.
4561
The VSCode maintainers are quite reasonable though,
4662
and you can ask for new features [in their repository](https://github.com/Microsoft/vscode).
4763

48-
## Known Issues in the Extension
64+
## Known issues in the extension
4965

5066
- If you are running the Preview version "PowerShell Preview" side-by-side with the stable version "PowerShell"
5167
you will experience performance and debug issues.
@@ -84,7 +100,7 @@ and you can ask for new features [in their repository](https://github.com/Micros
84100
may be opportunities to improve our integration with it in the
85101
[PowerShell Extension] too.
86102

87-
## Reporting an Issue
103+
## Reporting an issue
88104

89105
If you experience a problem with the [PowerShell Extension]:
90106

@@ -97,7 +113,7 @@ If you experience a problem with the [PowerShell Extension]:
97113
[look there].
98114
3. If you don't see the issue you're experiencing, please [open a new issue].
99115

100-
## Opening a New Issue
116+
## Opening a new issue
101117

102118
If you experience an issue with the [PowerShell Extension] and can't find
103119
an existing issue for it, [open an issue on us on GitHub].
@@ -118,7 +134,7 @@ When opening an issue, keep in mind:
118134
[tackling an issue], we always accept contributions and will help you
119135
at every step.
120136

121-
## Reproducing the Issue
137+
## Reproducing the issue
122138

123139
To fix the issue, we need to be able to reproduce it.
124140
To do that, we need:
@@ -134,7 +150,7 @@ the GitHub issue template will have sections
134150
to guide you through providing all of this information
135151
as well as environment information discussed below.
136152

137-
## Providing Information About Your Environment
153+
## Providing information about your environment
138154

139155
For solving most issues, the following information is important to provide:
140156

@@ -213,7 +229,7 @@ At this point, you may delete the setting if you want.
213229
[email protected]. Please still open an issue though
214230
so we can track the work &mdash; other users may have the same issue.
215231

216-
### Visual Studio Code Version
232+
### Visual Studio Code version
217233

218234
[Your VSCode version] can be obtained from the Integrated Console
219235
or PowerShell like this:
@@ -245,7 +261,7 @@ code: The term 'code' is not recognized as the name of a cmdlet, ...
245261
in this case, use the file menu in VSCode and choose `Help`>`About`
246262
(or `Code`>`About Visual Studio Code` on macOS) to get version information.
247263

248-
### PowerShell Extension Version
264+
### PowerShell extension version
249265

250266
[Your installed PowerShell Extension version] can similarly be found with:
251267

@@ -278,7 +294,8 @@ If VSCode isn't on your path use the [Command Palette]
278294
(<kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd>) to enter
279295
`Extensions: Show Installed Extensions` and list your extensions.
280296

281-
### Editor Services Version
297+
### Editor Services version
298+
282299
To get the [PowerShell Editor Services] version, in the Integrated
283300
Console, enter:
284301

@@ -289,7 +306,8 @@ Major Minor Build Revision
289306
1 8 4 0
290307
```
291308

292-
### PowerShell Version Table
309+
### PowerShell version table
310+
293311
You can get [your PowerShell version table] from the Integrated Console:
294312

295313
```powershell
@@ -307,7 +325,7 @@ SerializationVersion 1.1.0.1
307325
WSManStackVersion 3.0
308326
```
309327

310-
### Operating System Information
328+
### Operating system information
311329

312330
- Windows - all needed information should already be in the `$PSVersionTable`
313331
- macOS
@@ -316,7 +334,7 @@ WSManStackVersion 3.0
316334
- `uname -a`
317335
- Your distro and version (usually `lsb_release -a` is the best here)
318336

319-
### Note on Security
337+
### Note on security
320338

321339
If you believe there is a security vulnerability in the [PowerShell Extension]
322340
(or in [PowerShell Editor Services]), it **must** be reported directly to
@@ -328,7 +346,6 @@ an issue on GitHub is appropriate.
328346
[PowerShell Editor Services]: https://github.com/PowerShell/PowerShellEditorServices
329347
[PowerShell Extension]: https://github.com/PowerShell/vscode-powershell/
330348
[PSScriptAnalyzer]: https://github.com/PowerShell/PSScriptAnalyzer
331-
[PSReadLine]: https://github.com/lzybkr/PSReadLine
332349

333350
[Command Palette]: https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette
334351
[Coordinated Vulnerability Disclosure]: https://technet.microsoft.com/security/dn467923

0 commit comments

Comments
 (0)