Skip to content

Commit 463407a

Browse files
JustinGroteandyleejordan
authored andcommitted
Enable LanguageClient Tracing Option
Co-authored-by: Andy Jordan <[email protected]> 📄 Update Docs and instructions Remove note about it being an unsupported option
1 parent 6d897c8 commit 463407a

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

docs/troubleshooting.md

+4-7
Original file line numberDiff line numberDiff line change
@@ -287,25 +287,22 @@ your logs for any sensitive information you would not like to share online!**
287287

288288
#### Provide Language Server Protocol payload logs
289289

290-
The extension works mostly from exchanging messages with [PowerShell Editor Services][].
290+
A lot of the features of the PowerShell extension actually come from Visual Studio Code directly interacting with the [PowerShell Editor Services](https://github.com/PowerShell/PowerShellEditorServices) process via a [Language Server Protocol client](https://code.visualstudio.com/api/language-extensions/language-server-extension-guide#logging-support-for-language-server).
291291
In some cases, getting to the bottom of a bug will require looking at the payloads of
292-
these messages. To do this:
292+
these messages. To enable viewing these messages:
293293

294294
* Add the following setting to your settings file:
295295

296296
```json
297-
"powershell editor services.trace.server":"verbose"
297+
"powershell.trace.server":"verbose"
298298
```
299299

300-
> While VS Code will not recognize and highlight it, it is a valid option and enables
301-
> tracer logs on the server.
302-
303300
* Restart VS Code and reproduce the issue.
304301

305302
* Go into the "Output" panel (<kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>U</kbd> or
306303
<kbd>Cmd</kbd>+<kbd>Shift</kbd>+<kbd>U</kbd>).
307304

308-
* In the drop down on the right, select "PowerShell Editor Services".
305+
* In the drop down on the right, select "PowerShell Editor Services Client".
309306

310307
* Copy the entire contents of the Output panel and paste it into the GitHub issue in the
311308
browser. At this point, you may delete the setting if you want.

package.json

+10
Original file line numberDiff line numberDiff line change
@@ -1006,6 +1006,16 @@
10061006
"type": "boolean",
10071007
"default": false,
10081008
"markdownDescription": "Show buttons in the editor's title bar for moving the terminals pane (with the PowerShell Extension Terminal) around."
1009+
},
1010+
"powershell.trace.server": {
1011+
"type": "string",
1012+
"enum": [
1013+
"off",
1014+
"messages",
1015+
"verbose"
1016+
],
1017+
"default": "off",
1018+
"description": "Traces the communication between VS Code and the PowerShell Editor Services language server. **This setting is only meant for extension developers!**"
10091019
}
10101020
}
10111021
},

src/session.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ export class SessionManager implements Middleware {
644644
middleware: this,
645645
};
646646

647-
const languageClient = new LanguageClient("PowerShell Editor Services", connectFunc, clientOptions);
647+
const languageClient = new LanguageClient("powershell", "PowerShell Editor Services Client", connectFunc, clientOptions);
648648

649649
// This enables handling Semantic Highlighting messages in PowerShell Editor Services
650650
// TODO: We should only turn this on in preview.

0 commit comments

Comments
 (0)