Error on the Terminal Window

I’m getting my terminal spammed (about every 20 seconds) with this message:

Error executing PoshTools command: Exception calling “.ctor” with “1” argument(s): "Cannot perform operation because operation “NewNotSupportedException at offset 64 in file:line:column :0:0 " is not supported.”

any ideas?

Edit: this only happens when I have a Function or variable highlighted

Can you please send me what is in your Output stream for PoshTools?

Hi Adam… My Output Terminal is Empty (see Screenshots)

Error:

Output:

This doesn’t happen all the Time… Yesterday I didn’t see this at all…

You will need to click the drop down where it says Tasks and select PowerShell Pro Tools to see the output.

Duhhh For me :slight_smile:

I’ll reply once I get it again… Like I said I can’t always Reproduce it.

thx

ok I got the error again,

Starting PowerShell Pro Tools host from: c:\Users\Fred\.vscode\extensions\ironmansoftware.powershellprotools-5.20.6\out\windows\PowerShellProTools.Host.exe}
Process started
connect

Started to PowerShell Pro Tools process.
Connecting to PowerShell process 16544
Executing command: [System.Reflection.Assembly]::LoadFrom('c:\Users\Fred\.vscode\extensions\ironmansoftware.powershellprotools-5.20.6\out\windows\PowerShellProTools.VSCode.dll')

Executing command: Import-Module 'c:\Users\Fred\.vscode\extensions\ironmansoftware.powershellprotools-5.20.6\out\windows\PowerShellProTools.VSCode.dll'

Executing command: $Env:PSModulePath += ';c:\Users\Fred\.vscode\extensions\ironmansoftware.powershellprotools-5.20.6\out\windows\..\Modules'

Configuring runspace scheduler.

Executing command: 
                Get-Runspace | ForEach-Object {
                    $h = $_.GetType().GetProperty('Host', [System.Reflection.BindingFlags]::Instance -bor [System.Reflection.BindingFlags]::NonPublic).GetValue($_)
                    if ($h.Name -eq 'Visual Studio Code Host') 
                    {
                        $_.Id
                    }
                }
            

Executing command: 
                Get-Runspace | ForEach-Object {
                    $h = $_.GetType().GetProperty('Host', [System.Reflection.BindingFlags]::Instance -bor [System.Reflection.BindingFlags]::NonPublic).GetValue($_)
                    if ($h.Name -eq 'Visual Studio Code Host') 
                    {
                        $_.Id
                    }
                }
            

Executing command: 
                Get-Runspace | ForEach-Object {
                    $h = $_.GetType().GetProperty('Host', [System.Reflection.BindingFlags]::Instance -bor [System.Reflection.BindingFlags]::NonPublic).GetValue($_)
                    if ($h.Name -eq 'Visual Studio Code Host') 
                    {
                        $_.Id
                    }
                }
            

Executing command: 
                Get-Runspace | ForEach-Object {
                    $h = $_.GetType().GetProperty('Host', [System.Reflection.BindingFlags]::Instance -bor [System.Reflection.BindingFlags]::NonPublic).GetValue($_)
                    if ($h.Name -eq 'Visual Studio Code Host') 
                    {
                        $_.Id
                    }
                }
            

Executing command: 
                Get-Runspace | ForEach-Object {
                    $h = $_.GetType().GetProperty('Host', [System.Reflection.BindingFlags]::Instance -bor [System.Reflection.BindingFlags]::NonPublic).GetValue($_)
                    if ($h.Name -eq 'Visual Studio Code Host') 
                    {
                        $_.Id
                    }
                }
            

Executing command: 
                Get-Runspace | ForEach-Object {
                    $h = $_.GetType().GetProperty('Host', [System.Reflection.BindingFlags]::Instance -bor [System.Reflection.BindingFlags]::NonPublic).GetValue($_)
                    if ($h.Name -eq 'Visual Studio Code Host') 
                    {
                        $_.Id
                    }
                }
            

Found VS Code runspace: 5
Executing command: 
$RS = Get-Runspace -Id 5
$RS.Events.SubscribeEvent($null, 'PowerShell.OnIdle',  'PowerShell.OnIdle', $null, { 
        try {
        $PSPCommand = [PowerShellProTools.CommandQueue]::GetCommand()
        if ($PSPCommand) 
        { 
            $PSPResults = Invoke-Expression $PSPCommand.Value
            [PowerShellProTools.CommandQueue]::SetResults($PSPResults, $PSPCommand)
        } 
        } catch { [Console]::WriteLine('Error executing PoshTools command: ' + $_) }
    }, $true, $false)

Scheduling command for main runspace: Import-Module 'c:\Users\Fred\.vscode\extensions\ironmansoftware.powershellprotools-5.20.6\out\windows\PowerShellProTools.VSCode.dll' -Scope Global

Connected to PowerShell process.
Scheduling command for main runspace: $Commands = Get-Command 'ActivatePSRemoting' -ErrorAction SilentlyContinue; if ($Commands) { [System.Management.Automation.ProxyCommand]::Create((New-Object System.Management.Automation.CommandMetaData $Commands)) } else { '' } 

Error executing PowerShell: Exception calling "InvokeCommand" with "1" argument(s): "Timed out waiting on runspace scheduler."

Scheduling command for main runspace: Get-Variable | Out-PoshToolsVariable -PassThru | ConvertTo-Json -Depth 1 -WarningAction SilentlyContinue

Scheduling command for main runspace: $Commands = Get-Command 'TestTrustedHost' -ErrorAction SilentlyContinue; if ($Commands) { [System.Management.Automation.ProxyCommand]::Create((New-Object System.Management.Automation.CommandMetaData $Commands)) } else { '' } 

Scheduling command for main runspace: $Commands = Get-Command 'ActivatePSRemoting' -ErrorAction SilentlyContinue; if ($Commands) { [System.Management.Automation.ProxyCommand]::Create((New-Object System.Management.Automation.CommandMetaData $Commands)) } else { '' } 

Scheduling command for main runspace: $Commands = Get-Command 'TestTrustedHost' -ErrorAction SilentlyContinue; if ($Commands) { [System.Management.Automation.ProxyCommand]::Create((New-Object System.Management.Automation.CommandMetaData $Commands)) } else { '' } 

Scheduling command for main runspace: $Commands = Get-Command 'ActivatePSRemoting' -ErrorAction SilentlyContinue; if ($Commands) { [System.Management.Automation.ProxyCommand]::Create((New-Object System.Management.Automation.CommandMetaData $Commands)) } else { '' } 

Scheduling command for main runspace: $Commands = Get-Command 'TestTrustedHost' -ErrorAction SilentlyContinue; if ($Commands) { [System.Management.Automation.ProxyCommand]::Create((New-Object System.Management.Automation.CommandMetaData $Commands)) } else { '' } 

Scheduling command for main runspace: $Commands = Get-Command 'ActivatePSRemoting' -ErrorAction SilentlyContinue; if ($Commands) { [System.Management.Automation.ProxyCommand]::Create((New-Object System.Management.Automation.CommandMetaData $Commands)) } else { '' } 

Scheduling command for main runspace: $Commands = Get-Command 'ActivatePSRemoting' -ErrorAction SilentlyContinue; if ($Commands) { [System.Management.Automation.ProxyCommand]::Create((New-Object System.Management.Automation.CommandMetaData $Commands)) } else { '' } 

Scheduling command for main runspace: $Commands = Get-Command 'ActivatePSRemoting' -ErrorAction SilentlyContinue; if ($Commands) { [System.Management.Automation.ProxyCommand]::Create((New-Object System.Management.Automation.CommandMetaData $Commands)) } else { '' } 

Scheduling command for main runspace: $Commands = Get-Command 'TestTrustedHost' -ErrorAction SilentlyContinue; if ($Commands) { [System.Management.Automation.ProxyCommand]::Create((New-Object System.Management.Automation.CommandMetaData $Commands)) } else { '' } 

Scheduling command for main runspace: $Commands = Get-Command 'TestTrustedHost' -ErrorAction SilentlyContinue; if ($Commands) { [System.Management.Automation.ProxyCommand]::Create((New-Object System.Management.Automation.CommandMetaData $Commands)) } else { '' } 

Scheduling command for main runspace: Get-Variable | Out-PoshToolsVariable -PassThru | ConvertTo-Json -Depth 1 -WarningAction SilentlyContinue

Scheduling command for main runspace: Get-Variable | Out-PoshToolsVariable -PassThru | ConvertTo-Json -Depth 1 -WarningAction SilentlyContinue

Scheduling command for main runspace: $Commands = Get-Command 'Write-Host' -ErrorAction SilentlyContinue; if ($Commands) { [System.Management.Automation.ProxyCommand]::Create((New-Object System.Management.Automation.CommandMetaData $Commands)) } else { '' } 

Scheduling command for main runspace: $Commands = Get-Command 'Write-Host' -ErrorAction SilentlyContinue; if ($Commands) { [System.Management.Automation.ProxyCommand]::Create((New-Object System.Management.Automation.CommandMetaData $Commands)) } else { '' 
} 

Scheduling command for main runspace: $Commands = Get-Command 'Write-Host' -ErrorAction SilentlyContinue; if ($Commands) { [System.Management.Automation.ProxyCommand]::Create((New-Object System.Management.Automation.CommandMetaData $Commands)) } else { '' } 

Scheduling command for main runspace: $Commands = Get-Command 'Write-Host' -ErrorAction SilentlyContinue; if ($Commands) { [System.Management.Automation.ProxyCommand]::Create((New-Object System.Management.Automation.CommandMetaData $Commands)) } else { '' } 

Scheduling command for main runspace: $Commands = Get-Command 'Write-Host' -ErrorAction SilentlyContinue; if ($Commands) { [System.Management.Automation.ProxyCommand]::Create((New-Object System.Management.Automation.CommandMetaData $Commands)) } else { '' } 

Scheduling command for main runspace: $Commands = Get-Command 'Write-Host' -ErrorAction SilentlyContinue; if ($Commands) { [System.Management.Automation.ProxyCommand]::Create((New-Object System.Management.Automation.CommandMetaData $Commands)) } else { '' } 

Scheduling command for main runspace: $Commands = Get-Command 'Write-Host' -ErrorAction SilentlyContinue; if ($Commands) { [System.Management.Automation.ProxyCommand]::Create((New-Object System.Management.Automation.CommandMetaData $Commands)) } else { '' } 

Scheduling command for main runspace: $Commands = Get-Command 'Write-Host' -ErrorAction SilentlyContinue; if ($Commands) { [System.Management.Automation.ProxyCommand]::Create((New-Object System.Management.Automation.CommandMetaData $Commands)) } else { '' } 

Scheduling command for main runspace: $Commands = Get-Command 'Write-Host' -ErrorAction SilentlyContinue; if ($Commands) { [System.Management.Automation.ProxyCommand]::Create((New-Object System.Management.Automation.CommandMetaData $Commands)) } else { '' } 

Scheduling command for main runspace: $Commands = Get-Command 'Write-Host' -ErrorAction SilentlyContinue; if ($Commands) { [System.Management.Automation.ProxyCommand]::Create((New-Object System.Management.Automation.CommandMetaData $Commands)) } else { '' } 

Scheduling command for main runspace: Get-Variable | Out-PoshToolsVariable -PassThru | ConvertTo-Json -Depth 1 -WarningAction SilentlyContinue

Scheduling command for main runspace: $Commands = Get-Command '.\PsExec.exe' -ErrorAction SilentlyContinue; if ($Commands) { [System.Management.Automation.ProxyCommand]::Create((New-Object System.Management.Automation.CommandMetaData $Commands)) } else { '' } 

Error executing PowerShell: Exception calling "InvokeCommand" with "1" argument(s): "Timed out waiting on runspace scheduler."

Scheduling command for main runspace: $Commands = Get-Command 'Write-host' -ErrorAction SilentlyContinue; if ($Commands) { [System.Management.Automation.ProxyCommand]::Create((New-Object System.Management.Automation.CommandMetaData $Commands)) } else { '' } 

Scheduling command for main runspace: $Commands = Get-Command '.\PsExec.exe' -ErrorAction SilentlyContinue; if ($Commands) { [System.Management.Automation.ProxyCommand]::Create((New-Object System.Management.Automation.CommandMetaData $Commands)) } else { '' } 

Error executing PowerShell: Exception calling "InvokeCommand" with "1" argument(s): "Timed out waiting on runspace scheduler."
1 Like