-
Notifications
You must be signed in to change notification settings - Fork 10
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
PowerShell Pro Tools is still starting. #1
Comments
Same issue, also no logs in that location. |
vscode: OUTPUT: PowerShell Pro Tools[7/5/2024 9:46:18 AM] Opening a runspace.
[7/5/2024 9:46:18 AM] Loading PowerShell Pro Tools module
[7/5/2024 9:46:18 AM] Executing command: Import-Module 'C:\Users\jxsupport\.vscode\extensions\ironmansoftware.powershellprotools-2024.7.0\Modules\PowerShellProTools.VSCode\PowerShellProTools.VSCode.psd1'
[7/5/2024 9:46:18 AM] Executing command: $Env:PSModulePath += ';C:\Users\jxsupport\.vscode\extensions\ironmansoftware.powershellprotools-2024.7.0\Modules\PowerShellProTools.VSCode\..'
[7/5/2024 9:46:18 AM] Executing command: [PowerShellProTools.IntelliSenseManager]::Isv3()
[7/5/2024 9:46:19 AM] Configuring runspace scheduler.
[7/5/2024 9:46:19 AM] 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/5/2024 9:46:19 AM] Found VS Code runspace: 4
[7/5/2024 9:46:19 AM] Executing command: [PowerShellProTools.IntelliSenseManager]::InitV3(4)
[7/5/2024 9:46:20 AM] Scheduling command for main runspace: Import-Module 'C:\Users\jxsupport\.vscode\extensions\ironmansoftware.powershellprotools-2024.7.0\Modules\PowerShellProTools.VSCode\PowerShellProTools.VSCode.psd1' -Scope Global
Connected to PowerShell process.
Started PowerShell Pro Tools process. Missing Logsno logs found in $Env:AppData\PowerShell Pro Tools\ |
Can folks provide a little more detail?
|
Server:
Server:
Workstation:
|
the tree on the left sometimes loads from a fresh install, and as long as you do not restart vscode, you can use the stuff on the left |
I've added more logging around the startup process and added a setting to prevent the terminal from clearing so any errors will be visible. I still can't reproduce this on the 3 machines I tried. Some builds are kicking off for the PR and you could try the VSIX to see if it provides any more information. |
FWIW, occasionally the AST pane will load and function while the others are all spinning. |
It's certainly partially loading if any of those function. Still trying to nail down why most features would be stuck. The AST doesn't used the same Runspace as the PowerShell extension so might be a hint into the issue. |
I've released v2024.7.1 to try to diagnosis this. The Output panel logs should contain a lot more information about the startup process. There is also the |
Same issue, Powershell Pro Tools is still connecting, nothing is loaded, everything is up to date |
@tarzanboy13 Do you have anything in the logs? This release did not actually change the startup process but just added some more logging to help diagnosis. Logs are in Output \ PowerShell Pro Tools pane. You should also try setting the |
TLDR: I was able to reproduce this on another machine and think I have found the behavior that is causing it. You can try this VSIX here: https://github.com/ironmansoftware/powershell-pro-tools/actions/runs/9826757126 The issue seems to be that some features were attempting to access the PoshTools server before it was started. First, refactoring feature was attempting to send commands to the server while it was starting due to an invalid check on whether the server was started. If you have a PS1 file open and are moving the cursor around the document, it will send a command to get valid refactors over and over again which cause it to attempt to reconnect the server over and over again while it is already trying to start. It somehow gets in a state where it never connects. Second, the tree view was trying to load before it was connected. While it wasn't sending commands, it would just give up and that's why they would spin forever. I've fixed the refactor and tree view issues and now I can no longer reproduce on my other machine that was previously exhibiting this behavior. EDIT: I've been able to reproduce this on at least 4 machines and verify the fix. I'll get a release out and if others are still having problems, we can continue to investigate. |
@tarzanboy13 - Can you go to the PowerShell terminal and type $error? I'm wondering if there was an error as it was trying to import the module. |
2024.7.2 shows "there is no data provider that can provide view data" in all panes. Output for PowerShell Pro Tools shows ths: |
@MikeShepard Thanks. That's the same startup log that @tarzanboy13 is seeing. The That said, I'm not sure why I don't see this either. Do you have errors like @tarzanboy13 does in your PS Extension terminal? |
@adamdriscoll - I don't see any errors in the extension terminal. FWIW, this is my home machine rather than work, so no agents/security software to worry about. |
Certainly seems like some sort of timing issue or something. Will continue to test more environments and hope we can continue to gather some info from other folks as well. |
I'm getting some to load and some not loading. In one that doesn't load I see this in the Powershell Pro Tools output window:
In the extension host output window I see this:
|
I guess that's progress. If you want to try the build with the retry\reconnect fixed, it may improve the situation with the ones not loading: https://github.com/ironmansoftware/powershell-pro-tools/actions/runs/9829865936 Currently, imports the module in PS, waits 1 second and attempts to connect, does not retry and hangs. With the retry fixed, it should attempt to connect again for up to 5 seconds. |
It started and connected with all 3 projects I tried:
It did take a bit (~30 seconds) for all of them to load fully, but I think that's to be expected. |
Great news! I'll get a release out. As for the startup time, that isn't too surprising. Loading the module pane can slow down startup since it takes a while to retrieve all that info. |
@adamdriscoll thank you for the help on this even though I wasn't able to provide much info besides the original post. I was able to get around finally and updated PowerShell Pro Tools extension to the latest version on the vs code marketplace and for me it is working with no issues. Status bar is showing connected. Features are working properly. This is resolved for me. I see there is some conversations continuing still so I will not set it to close just yet. |
Ok, for me its working now but i had to open vscode without my big workspace (i opened txt file) and it worked and next time i opened that big workspace with many .ps files and worked and sometimes not. |
After upgrade:[8:12:54.631] Starting PowerShell Pro Tools...
[8:12:58.3] Finishing extension activation.
[8:12:58.4] Connecting to PowerShell Editor Services.
[8:12:58.5] Importing module in PowerShell and starting server.
[8:12:59.13] Connecting named pipe to PoshTools server.
[8:12:59.31] Opening a runspace.
[8:12:59.52] Loading PowerShell Pro Tools module
[8:12:59.52] Executing command: Import-Module 'C:\Users\matt_m\.vscode\extensions\ironmansoftware.powershellprotools-2024.7.3\Modules\PowerShellProTools.VSCode\PowerShellProTools.VSCode.psd1'
[8:12:59.102] Executing command: $Env:PSModulePath += ';C:\Users\matt_m\.vscode\extensions\ironmansoftware.powershellprotools-2024.7.3\Modules\PowerShellProTools.VSCode\..'
[8:12:59.113] Executing command: [PowerShellProTools.IntelliSenseManager]::Isv3()
[8:12:59.118] Configuring runspace scheduler.
[8:12:59.119] 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
}
}
[8:12:59.177] Found VS Code runspace: 4
[8:12:59.178] Executing command: [PowerShellProTools.IntelliSenseManager]::InitV3(4)
[8:12:59.198] Scheduling command for main runspace: Import-Module 'C:\Users\matt_m\.vscode\extensions\ironmansoftware.powershellprotools-2024.7.3\Modules\PowerShellProTools.VSCode\PowerShellProTools.VSCode.psd1' -Scope Global
[8:12:59.505] Connected to PowerShell process.
[8:12:59.505] Creating tree views.
[8:12:59.507] Starting code analysis.
[8:12:59.507] Started PowerShell Pro Tools process.
[8:12:59.514] Executing command: Get-PSHostProcessInfo
[8:12:59.532] Executing command: Get-Module -ListAvailable
[8:13:2.441] Scheduling command for main runspace: Get-PSProvider | Select-Object -ExpandProperty Name
[8:13:2.643] Scheduling command for main runspace: Get-Job | ForEach-Object { [PowerShellToolsPro.Cmdlets.VSCode.PSJob]$_ } | ConvertTo-Json -WarningAction SilentlyContinue
[8:13:2.961] Executing command: [PowerShellToolsPro.Cmdlets.VSCode.PSAssembly]::GetAssemblies()
[8:13:3.17] Scheduling command for main runspace: [PowerShellToolsPro.VSCode.TreeViewService]::Instance.GetTreeViews() | ConvertTo-Json -WarningAction SilentlyContinue
[8:13:3.275] Scheduling command for main runspace: Get-Content (Get-PSReadLineOption).HistorySavePath | Select-Object -First 25
[8:13:3.599] Scheduling command for main runspace: Get-PSSession | ForEach-Object { [PowerShellToolsPro.Cmdlets.VSCode.Session]$_ } | ConvertTo-Json -WarningAction SilentlyContinue
[8:13:3.916] Scheduling command for main runspace: Get-Variable | Out-PoshToolsVariable -PassThru -ExcludeAutomatic $False | ConvertTo-Json -Depth 1 -WarningAction SilentlyContinue After vscode restart |
Same for me. I am glad that i am not alone. |
Ok. The temporary terminal is currently not supported. PoshTools really doesn't like when the PowerShell Extension terminal process goes away and comes back all the time. We'll have to put some more robust reconnection logic in place to support that. That said, we should have a clear error message when this is happening in the meantime because it's too hard to figure out what's going on. EDIT: Another thing we may be able to do now that PoshTools is open source is put in a PR to the PowerShell Extension to have some way of it loading this extension if it's installed. This would effectively remove the need to try to connect from PoshTools to PSES because it would just do the loading for us. |
i created a new vscode profile, reduced my extensions down to 2, and nothing: funny thing, it works in vscode insiders EDIT:
|
Ok. Weird. Glad it's working for the most part. We have an issue for tracking the temporary console issue: #34 I think this starting issue is mostly solved so I might just move discussion on the temporary console issue over to that other one and close this. I'll leave this open for a day or so and see if we get some more feedback. |
Describe the bug
When launching VS Code the PowerShell Pro Tools does not fully launch. The workspace button like Package Script as Exe, Show Form Designer, etc.. will appear but upon clicking on any button it will produce a message that "PowerShell Pro Tools is still starting". At the VSCode status bar it says "PowerShell Pro Tools is connecting...". Finally, the navigation bar does not load any items like it is still loading.
To Reproduce
Steps to reproduce the behavior:
Launch VSCode normally and wait for extension to load like normal.
Expected behavior
To fully launch to allow full access to all features using version 2024
Screenshots
Version
Tool (Visual Studio, VS Code, PSScriptPad, PS Module): 1.90.2
Version Number: v2024.3.1
Operating System: Windows 11 23H2
Additional context
On the latest version, before I would be able to disable and enable the extension a couple of times and then it would fully launch. Currently I am not having any luck with doing this method.
I have noticed that if I downgrade version to 2023.12.2 or earlier PowerShell Pro Tools will load after restart of the extension fully. Status bar shows PowerShell Pro Tools is connected. If I upgrade back to any 2024 version then the extension will not load.
Logs
Please upload a log. Logs are found in $Env:AppData\PowerShellProTools\ by default.
There is no logs in this location. Only have a license file.
I have checked VSCode Output but there is no output for v2024. When on v2023 there is output from VSCode Output.
Any other locations to look for logs, please provide.
The text was updated successfully, but these errors were encountered: