Skip to content

Add known PowerShell.OnIdle event bug to troubleshooting.md #3824

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 3 commits into from
Feb 15, 2022
Merged
Changes from all commits
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
13 changes: 12 additions & 1 deletion docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,17 @@ and you can ask for new features [in their repository](https://github.com/Micros
- Document formatting is provided by [PSScriptAnalyzer], but there
may be opportunities to improve our integration with it in the
[PowerShell Extension] too.
- PSReadLine throws an error ever so often - [#3701](https://github.com/PowerShell/vscode-powershell/issues/3701)
- This is a known issue due to the PowerShell eventing framework running registered
`OnIdle` events outside of PowerShell Editor Service's dedicated PowerShell execution
pipeline. Until we can disable event registration, you will need to avoid registering
events in the first place.
- A known work around includes unregistering from this event.
`Get-EventSubscriber -Force -SourceIdentifier PowerShell.OnIdle -EA 0 | Unregister-Event -Force`
can be run manually (or added to your profile) to avoid this bug.
* Related issues: [PowerShell Editor Services #1591](https://github.com/PowerShell/PowerShellEditorServices/issues/1591),
[PSReadLine #3091](https://github.com/PowerShell/PSReadLine/issues/3091),
[Azure PowerShell #16585](https://github.com/Azure/azure-powershell/issues/16586)

## Reporting an issue

Expand Down Expand Up @@ -263,7 +274,7 @@ In some cases, getting to the bottom of a bug will require looking at the payloa
```json
"powershell editor services.trace.server":"verbose"
```

> NOTE: While VSCode will not recognize and highlight it, it is a valid option and enables tracer logs on the server.

- Restart Visual Studio Code and reproduce the issue.
Expand Down