Skip to content

Add new logging docs #2254

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 4, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 26 additions & 7 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,18 +137,13 @@ Logs provide context for what was happening when the issue occurred.
**Note: You should skim through your logs for any sensitive information you would not like to share online**

- Before sending through logs, try and reproduce the issue with
**log level set to Verbose** or **Diagnostic**. You can set this
**log level set to Diagnostic**. You can set this
in the [VSCode Settings] (<kbd>Ctrl</kbd>+<kbd>,</kbd>) with:

```json
"powershell.developer.editorServicesLogLevel": "Verbose"
```

or for diagnostic logging:

```json
"powershell.developer.editorServicesLogLevel": "Diagnostic"
```

After you have captured the issue with the log level turned up,
you may want to return it (since verbose logging can use disk space):

Expand Down Expand Up @@ -185,6 +180,30 @@ Logs provide context for what was happening when the issue occurred.
vscode-powershell@microsoft.com. Please still open an issue though
so we can track the work &mdash; other users may have the same issue.

#### Provide Language Server Protocol payload logs

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we specify that this only applies to certain versions of the extension i.e. if you have 2019-10 or above?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added!

The PowerShell extension works mostly from sending and receiving messages from [PowerShell Editor Services](httos://github.com/PowerShell/PowerShellEditorServices).
If we need more information, we may ask to see the payloads of these messages. To do this:

- Add the following setting to your settings file:

```json
"powershell editor services.trace.server":"verbose"
```

- Restart Visual Studio Code and reproduce the issue.

- Go into the "Output" panel (<kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>U</kbd> or <kbd>Cmd</kbd>+<kbd>Shift</kbd>+<kbd>U</kbd>).

- In the drop down on the right, select "PowerShell Editor Services".

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

- Again, if you prefer to share your logs privately, you can send them to
vscode-powershell@microsoft.com. Please still open an issue though
so we can track the work &mdash; other users may have the same issue.

### Visual Studio Code Version

[Your VSCode version] can be obtained from the Integrated Console
Expand Down