Tool: Visual Studio Code, PSScriptPad
Version: 5.28.10
VS Code Version: 1.58.0
I went through a few of the topics that mention the same issue I am experiencing, but some of the fixes that worked for other people have not worked for me.
What I have tried:
- uninstalling/reinstalling the extension
- Installing a previous version 5.28.7
- Disabling DEP for Code.exe, PowerShellProTools.Host.exe and PSScriptpad.exe
- Turning off providers
I still can’t seem to get it to load.
Here is the output:
Starting PowerShell Pro Tools host from: c:\Users\username\.vscode\extensions\ironmansoftware.powershellprotools-5.28.10\out\windows\PowerShellProTools.Host.exe}
Process started
[7/8/2021 3:54:04 PM] connect
Connecting to PowerShell process 9536
[7/8/2021 3:54:06 PM] Opening a remote runspace.
[7/8/2021 3:54:06 PM] Loading PowerShell Pro Tools module
[7/8/2021 3:54:06 PM] Executing command: [System.Reflection.Assembly]::LoadFrom('c:\Users\username\.vscode\extensions\ironmansoftware.powershellprotools-5.28.10\out\windows\PowerShellProTools.VSCode.dll')
[7/8/2021 3:54:07 PM] Executing command: Import-Module 'c:\Users\username\.vscode\extensions\ironmansoftware.powershellprotools-5.28.10\out\windows\PowerShellProTools.VSCode.dll'
[7/8/2021 3:54:07 PM] Executing command: $Env:PSModulePath += ';c:\Users\username\.vscode\extensions\ironmansoftware.powershellprotools-5.28.10\out\windows\..\Modules'
[7/8/2021 3:54:07 PM] Configuring runspace scheduler.
[7/8/2021 3:54:07 PM] 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
}
}
[7/8/2021 3:54:07 PM] 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
}
}
[7/8/2021 3:54:07 PM] 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
}
}
[7/8/2021 3:54:07 PM] 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
}
}
[7/8/2021 3:54:07 PM] 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
}
}
[7/8/2021 3:54:07 PM] Found VS Code runspace: 5
[7/8/2021 3:54:07 PM] 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 { [PowerShellProTools.CommandQueue]::SetResults($_.ToString(), $PSPCommand) }
}, $true, $false)
[7/8/2021 3:54:07 PM] Scheduling command for main runspace: Import-Module 'c:\Users\username\.vscode\extensions\ironmansoftware.powershellprotools-5.28.10\out\windows\PowerShellProTools.VSCode.dll' -Scope Global
Connected to PowerShell process.
Started PowerShell Pro Tools process.
ps. I am also having the issue where PSScriptPad will open once, and then not again, unless i close and reopen VS Code.