From cdee85ff6f3c9a1154ed0e67138ebd0df5f3904c Mon Sep 17 00:00:00 2001 From: Steven Bucher Date: Fri, 11 Feb 2022 09:22:55 -0800 Subject: [PATCH 1/3] added troubleshooting help for PSReadLine bug --- docs/troubleshooting.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 4bc73f3abb..56994cd80c 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -147,8 +147,13 @@ 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. - -## Reporting an issue +- PSReadLine throws an error ever so often [#3701](https://github.com/PowerShell/vscode-powershell/issues/3701) + - This is a known issue due to the + `OnPowerShellIdle` function + waiting to process events unknown we know the rest of the startup process has finished. ## + Reporting an issue + - A known work around includes unregistering from this event. `Get-EventSubscriber -Force -SourceIdentifier PowerShell.OnIdle -EA 0 | Unregister-Event -Force` can be added to your profile to help prevent this issue. + - Related Issues [#3091](https://github.com/PowerShell/PSReadLine/issues/3091) [#16585](https://github.com/Azure/azure-powershell/issues/16586) If you experience a problem with the [PowerShell Extension]: From 091db7b0652227e71768207f566f517d086f5ae3 Mon Sep 17 00:00:00 2001 From: Steven Bucher Date: Fri, 11 Feb 2022 09:24:54 -0800 Subject: [PATCH 2/3] Small grammatical fixes --- docs/troubleshooting.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 56994cd80c..8c8cdda3df 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -150,8 +150,7 @@ and you can ask for new features [in their repository](https://github.com/Micros - PSReadLine throws an error ever so often [#3701](https://github.com/PowerShell/vscode-powershell/issues/3701) - This is a known issue due to the `OnPowerShellIdle` function - waiting to process events unknown we know the rest of the startup process has finished. ## - Reporting an issue + waiting to process events unknown we know the rest of the startup process has finished. - A known work around includes unregistering from this event. `Get-EventSubscriber -Force -SourceIdentifier PowerShell.OnIdle -EA 0 | Unregister-Event -Force` can be added to your profile to help prevent this issue. - Related Issues [#3091](https://github.com/PowerShell/PSReadLine/issues/3091) [#16585](https://github.com/Azure/azure-powershell/issues/16586) From 0502eeda9d7229c4a5f8b5f82d0a4999f7a0cdd8 Mon Sep 17 00:00:00 2001 From: Steven Bucher Date: Fri, 11 Feb 2022 09:25:45 -0800 Subject: [PATCH 3/3] Adding back reporting issue title --- docs/troubleshooting.md | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 8c8cdda3df..25b5ea6a82 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -147,12 +147,19 @@ 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 - `OnPowerShellIdle` function - waiting to process events unknown we know the rest of the startup process has finished. - - A known work around includes unregistering from this event. `Get-EventSubscriber -Force -SourceIdentifier PowerShell.OnIdle -EA 0 | Unregister-Event -Force` can be added to your profile to help prevent this issue. - - Related Issues [#3091](https://github.com/PowerShell/PSReadLine/issues/3091) [#16585](https://github.com/Azure/azure-powershell/issues/16586) +- 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 If you experience a problem with the [PowerShell Extension]: @@ -267,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.