3
3
This document contains troubleshooting steps for commonly reported issues when using the
4
4
[ PowerShell Extension] for Visual Studio Code.
5
5
6
- ## Script Analysis is Reporting False Errors
6
+ ## How do I debug my PowerShell script?
7
7
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!):
11
10
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/ )
13
+
14
+ ## Script analysis is reporting false errors
15
+
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
13
21
14
22
PowerShell syntax highlighting is not performed by the [ PowerShell Extension] .
15
23
Instead syntax highlighting for VSCode, Atom, SublimeText and even GitHub is
@@ -30,7 +38,19 @@ were, set:
30
38
If you leave it enabled, you can customize the colors used for the various
31
39
tokens. See [ #3221 ] for more info and to leave suggestions.
32
40
33
- ## VSCode is not working like the ISE
41
+ ## PSReadline features aren't working
42
+
43
+ Integration of [ PSReadline] into the PowerShell Integrated Console is under active
44
+ development, so some features (like history recall) don't yet work. Additionally, the
45
+ terminal itself is a custom PowerShell host implementation and is far from perfect.
46
+
47
+ ## Windows aren't appearing
48
+
49
+ Due to an [ issue] ( https://github.com/Microsoft/vscode/issues/42356 ) in Electron, windows
50
+ spawned by Visual Studio Code (such as those for ` Get-Credential ` , ` Connect-MsolService ` ,
51
+ ` Connect-AzAccount ` , ` Connect-AzureAd ` , etc.) do not appear above Visual Studio Code.
52
+
53
+ ## Visual Studio Code is not working like the ISE
34
54
35
55
The PowerShell extension does not aim to perfectly recreate
36
56
the experience of the PowerShell ISE.
@@ -45,7 +65,7 @@ VSCode itself and can't be changed by the extension.
45
65
The VSCode maintainers are quite reasonable though,
46
66
and you can ask for new features [ in their repository] ( https://github.com/Microsoft/vscode ) .
47
67
48
- ## Known Issues in the Extension
68
+ ## Known issues in the extension
49
69
50
70
- If you are running the Preview version "PowerShell Preview" side-by-side with the stable version "PowerShell"
51
71
you will experience performance and debug issues.
@@ -84,7 +104,7 @@ and you can ask for new features [in their repository](https://github.com/Micros
84
104
may be opportunities to improve our integration with it in the
85
105
[ PowerShell Extension] too.
86
106
87
- ## Reporting an Issue
107
+ ## Reporting an issue
88
108
89
109
If you experience a problem with the [ PowerShell Extension] :
90
110
@@ -97,7 +117,7 @@ If you experience a problem with the [PowerShell Extension]:
97
117
[ look there] .
98
118
3 . If you don't see the issue you're experiencing, please [ open a new issue] .
99
119
100
- ## Opening a New Issue
120
+ ## Opening a new issue
101
121
102
122
If you experience an issue with the [ PowerShell Extension] and can't find
103
123
an existing issue for it, [ open an issue on us on GitHub] .
@@ -118,7 +138,7 @@ When opening an issue, keep in mind:
118
138
[ tackling an issue] , we always accept contributions and will help you
119
139
at every step.
120
140
121
- ## Reproducing the Issue
141
+ ## Reproducing the issue
122
142
123
143
To fix the issue, we need to be able to reproduce it.
124
144
To do that, we need:
@@ -134,7 +154,7 @@ the GitHub issue template will have sections
134
154
to guide you through providing all of this information
135
155
as well as environment information discussed below.
136
156
137
- ## Providing Information About Your Environment
157
+ ## Providing information about your environment
138
158
139
159
For solving most issues, the following information is important to provide:
140
160
@@ -213,7 +233,7 @@ At this point, you may delete the setting if you want.
213
233
vscode-powershell@microsoft.com . Please still open an issue though
214
234
so we can track the work &mdash ; other users may have the same issue.
215
235
216
- ### Visual Studio Code Version
236
+ ### Visual Studio Code version
217
237
218
238
[ Your VSCode version] can be obtained from the Integrated Console
219
239
or PowerShell like this:
@@ -245,7 +265,7 @@ code: The term 'code' is not recognized as the name of a cmdlet, ...
245
265
in this case, use the file menu in VSCode and choose ` Help ` >` About `
246
266
(or ` Code ` >` About Visual Studio Code ` on macOS) to get version information.
247
267
248
- ### PowerShell Extension Version
268
+ ### PowerShell extension version
249
269
250
270
[ Your installed PowerShell Extension version] can similarly be found with:
251
271
@@ -278,7 +298,8 @@ If VSCode isn't on your path use the [Command Palette]
278
298
(<kbd >Ctrl</kbd >+<kbd >Shift</kbd >+<kbd >P</kbd >) to enter
279
299
` Extensions: Show Installed Extensions ` and list your extensions.
280
300
281
- ### Editor Services Version
301
+ ### Editor Services version
302
+
282
303
To get the [ PowerShell Editor Services] version, in the Integrated
283
304
Console, enter:
284
305
@@ -289,7 +310,8 @@ Major Minor Build Revision
289
310
1 8 4 0
290
311
```
291
312
292
- ### PowerShell Version Table
313
+ ### PowerShell version table
314
+
293
315
You can get [ your PowerShell version table] from the Integrated Console:
294
316
295
317
``` powershell
@@ -307,7 +329,7 @@ SerializationVersion 1.1.0.1
307
329
WSManStackVersion 3.0
308
330
```
309
331
310
- ### Operating System Information
332
+ ### Operating system information
311
333
312
334
- Windows - all needed information should already be in the ` $PSVersionTable `
313
335
- macOS
@@ -316,7 +338,7 @@ WSManStackVersion 3.0
316
338
- ` uname -a `
317
339
- Your distro and version (usually ` lsb_release -a ` is the best here)
318
340
319
- ### Note on Security
341
+ ### Note on security
320
342
321
343
If you believe there is a security vulnerability in the [ PowerShell Extension]
322
344
(or in [ PowerShell Editor Services] ), it ** must** be reported directly to
0 commit comments