Skip to content

Commit 9f189d4

Browse files
authored
Merge pull request #442 from PowerShell/release/0.9.0
Release 0.9.0
2 parents 2f7ee91 + faa2d81 commit 9f189d4

File tree

3 files changed

+147
-2
lines changed

3 files changed

+147
-2
lines changed

Diff for: CHANGELOG.md

+145
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,150 @@
11
# vscode-powershell Release History
22

3+
## 0.9.0
4+
### Thursday, January 19, 2017
5+
6+
#### New PowerShell code formatter
7+
8+
We've added a formatter for PowerShell code which allows you to format an
9+
entire file or a selection within a file. You can access this formatter by
10+
running VS Code's `Format Document` and `Format Selection` commands inside
11+
of a PowerShell file.
12+
13+
You can configure code formatting with the following settings:
14+
15+
- `powershell.codeFormatting.openBraceOnSameLine` - Places open brace on the
16+
same line as its associated statement. Default is `true`.
17+
- `powershell.codeFormatting.newLineAfterOpenBrace` - Ensures that a new line
18+
occurs after an open brace (unless in a pipeline statement on the same line).
19+
Default is `true`
20+
- `editor.tabSize` - Specifies the indentation width for code blocks. This
21+
is a VS Code setting but it is respected by the code formatter.
22+
- `editor.formatOnSave` - If true, automatically formats when they are saved.
23+
This is a VS Code setting and may also affect non-PowerShell files.
24+
25+
Please note that this is only a first pass at PowerShell code formatting, it
26+
may not format your code perfectly in all cases. If you run into any issues,
27+
please [file an issue](https://github.com/PowerShell/vscode-powershell/issues/new)
28+
and give us your feedback!
29+
30+
#### Streamlined debugging experience - launch.json is now optional!
31+
32+
**NOTE: This improvement depends on VS Code 1.9.0 which is due for release
33+
early February!** However, you can try it out right now with the [VS Code Insiders](https://code.visualstudio.com/insiders)
34+
release.
35+
36+
Thanks to a new improvement in VS Code's debugging APIs, we are now able to
37+
launch the PowerShell debugger on a script file without the need for a `launch.json`
38+
file. You can even debug individual PowerShell scripts without opening a
39+
workspace folder! Don't worry, you can still use a `launch.json` file to configure
40+
specific debugging scenarios.
41+
42+
We've also made debugger startup much more reliable. You will no longer see the
43+
dreaded "Debug adapter terminated unexpectedly" message when you try to launch
44+
the debugger while the language server is still starting up.
45+
46+
#### Support for debugging remote and attached runspaces
47+
48+
We now support remote PowerShell sessions via the [`Enter-PSSession`](https://msdn.microsoft.com/en-us/powershell/reference/5.0/microsoft.powershell.core/enter-pssession)
49+
cmdlet. This cmdlet allows you to create a PowerShell session on another machine
50+
so that you can run commands or debug scripts there. The full debugging
51+
experience works with these remote sessions on PowerShell 4 and above, allowing
52+
you to set breakpoints and see remote files be opened locally when those breakpoints
53+
are hit.
54+
55+
For PowerShell 5 and above, we also support attaching to local and remote PowerShell
56+
host processes using the [`Enter-PSHostProcess`](https://msdn.microsoft.com/en-us/powershell/reference/5.0/microsoft.powershell.core/enter-pshostprocess)
57+
and [`Debug-Runspace`](https://msdn.microsoft.com/en-us/powershell/reference/5.0/microsoft.powershell.utility/debug-runspace)
58+
cmdlets. This allows you to jump into another process and then debug a script that
59+
is already running in one of the runspaces in that process. The debugger will break
60+
execution of the running script and then the associated script file will be opened
61+
in the editor so that you can set breakpoints and step through its execution.
62+
63+
We've also added a new `launch.json` configuration for debugging PowerShell host processes:
64+
65+
![Process launch configuration screenshot](https://cloud.githubusercontent.com/assets/79405/22089468/391e8120-dda0-11e6-950c-64f81b364c35.png)
66+
67+
When launched, the default "attach" configuration will prompt you with a list of
68+
PowerShell host processes on the local machine so that you can easily select one
69+
to be debugged:
70+
71+
![Process selection UI screenshot](https://cloud.githubusercontent.com/assets/79405/22081037/c205e516-dd76-11e6-834a-66f4c38e181d.png)
72+
73+
You can also edit the launch configuration to hardcode the launch parameters, even
74+
setting a remote machine to connect to before attaching to the remote process:
75+
76+
```json
77+
{
78+
"type": "PowerShell",
79+
"request": "attach",
80+
"name": "PowerShell Attach to Host Process",
81+
"computerName": "my-remote-machine",
82+
"processId": "12345",
83+
"runspaceId": 1
84+
}
85+
```
86+
87+
Please note that we currently do not yet support initiating remote sessions from Linux
88+
or macOS. This will be supported in an upcoming release.
89+
90+
#### Initial support for remote file opening using `psedit`
91+
92+
Another nice improvement is that we now support the `psedit` command in remote and
93+
attached sessions. This command allows you to open a file in a local or remote session
94+
so that you can set breakpoints in it using the UI before launching it. For now these
95+
remotely-opened files will not be saved back to the remote session when you edit and
96+
save them. We plan to add this capability in the next feature update.
97+
98+
#### New "interactive session" debugging mode
99+
100+
You can now create a new launch configuration which drops you directly into the
101+
debug console so that you can debug your scripts and modules however you wish.
102+
You can call Set-PSBreakpoint to set any type of breakpoint and then invoke your
103+
code through the console to see those breakpoints get hit. This mode can also be
104+
useful for debugging remote sessions.
105+
106+
![Interactive session config screenshot](https://cloud.githubusercontent.com/assets/79405/22089502/5e56b4c6-dda0-11e6-8a51-f24e29ce7988.png)
107+
108+
Please note that this is NOT a replacement for a true interactive console experience.
109+
We've added this debugging configuration to enable a few other debugging scenarios, like
110+
debugging PowerShell modules, while we work on a true interactive console experience using
111+
VS Code's Terminal interface.
112+
113+
#### New document symbol support for PSD1 files
114+
115+
We've extended our document symbol support to `.psd1` files to make it really easy to
116+
navigate through them. When you have a `.psd1` file open, run the `Go to Symbol in File...`
117+
command (<kbd>Ctrl + Shift + O</kbd>) and you'll see this popup:
118+
119+
![psd1 symbol screenshot](https://cloud.githubusercontent.com/assets/79405/22094872/85c7d9a2-ddc5-11e6-9bee-5fc8c3dae097.png)
120+
121+
You can type a symbol name or navigate using your arrow keys. Once you select one of the
122+
symbol names, the editor pane will jump directly to that line.
123+
124+
#### Other fixes and improvements
125+
126+
- Added a new `Open Examples Folder` command to easily open the extension's
127+
example script folder.
128+
- Added a new setting `powershell.developer.powerShellExeIsWindowsDevBuild`
129+
which, when true, indicates that the `powerShellExePath` points to a Windows
130+
PowerShell development build.
131+
- Fixed [#395](https://github.com/PowerShell/vscode-powershell/issues/395):
132+
Quick Fix for PSAvoidUsingAliases rule replaces the entire command
133+
- Fixed [#396](https://github.com/PowerShell/vscode-powershell/issues/396):
134+
Extension commands loaded in PowerShell profile are not being registered
135+
- Fixed [#391](https://github.com/PowerShell/vscode-powershell/issues/391):
136+
DSC IntelliSense can cause the language server to crash
137+
- Fixed [#400](https://github.com/PowerShell/vscode-powershell/issues/400):
138+
Language server can crash when selecting PSScriptAnalyzer rules
139+
- Fixed [#408](https://github.com/PowerShell/vscode-powershell/issues/408):
140+
Quick fix requests meant for other extensions crash the language server
141+
- Fixed [#401](https://github.com/PowerShell/vscode-powershell/issues/401):
142+
Extension startup should indicate if the current PowerShell version is unsupported
143+
- Fixed [#314](https://github.com/PowerShell/vscode-powershell/issues/314):
144+
Errors/Warnings still show up in Problems window when file is closed
145+
- Fixed [#388](https://github.com/PowerShell/vscode-powershell/issues/388):
146+
Syntax errors are not reported when powershell.scriptAnalysis.enable is set to false
147+
3148
## 0.8.0
4149
### Friday, December 16, 2016
5150

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "PowerShell",
33
"displayName": "PowerShell",
4-
"version": "0.8.0",
4+
"version": "0.9.0",
55
"publisher": "ms-vscode",
66
"description": "Develop PowerShell scripts in Visual Studio Code!",
77
"engines": {

Diff for: src/main.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import { DocumentFormatterFeature } from './features/DocumentFormatter';
2727

2828
// NOTE: We will need to find a better way to deal with the required
2929
// PS Editor Services version...
30-
var requiredEditorServicesVersion = "0.8.0";
30+
var requiredEditorServicesVersion = "0.9.0";
3131

3232
var logger: Logger = undefined;
3333
var sessionManager: SessionManager = undefined;

0 commit comments

Comments
 (0)