-
Notifications
You must be signed in to change notification settings - Fork 513
Command 'PowerShell: Show Extension Terminal' resulted in an error (command 'PowerShell.ShowSessionConsole' not found) #4136
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
Comments
Hello! The latest code is available in the PowerShell Preview for VS Code, and includes a myriad of fixes. Could you verify if this issue still reproduces using the preview extension? Please note that this preview is likely to include other bugs, and you should feel free to file new issues for those so we can work through them. Thanks again! |
Could you also check your workspace file and ensure it's valid JSON? |
I'm reproducing on v2022.7.2 when I have a workspace with no folders. If I add a folder, the extension behaves as expected. I'm not seeing it on the preview v2022.8.2. Test workspace is just:
In the VSCode developer tools console, I see:
|
I will try the preview tomorrow, I am off for the rest of today.
I saw that other issue mentioning the invalid JSON in the workspace file but my workspace is valid JSON. I checked that earlier.
My workspace is also not completely empty as the other person mentioned in their reproduction of the issue.
|
Sorry, saw this on Reddit and it looked like what I experienced. My issue is actually a dupe of #4102 |
If it's not reproducing with v2022.8.2 then it's fixed 😆 |
Oh, you're not the OP. |
I updated to the Preview extension ( |
I was able to get a little more information from the logs during VS Code startup this time (with the Preview extension still installed). Not sure why I didn't get this the last time I went through the logs, but I'm getting the following error now when the extension tries to load:
|
That makes sense given what other people have seen. I just need to get a local repro. Essentially around where we read and write to the workspace (if you have multiple root folders, we ask you to select which folder for the |
Would it help if I share my workspace file? |
Okay, I just got this to work with the Preview plugin, but I'm not sure why I haven't gotten this prompt up until this point. It asked me to select a working directory for the PowerShell extension. Now it remembers and loads up every time. I think this might be the crux of the issue, if the extension needs a working directory selected by the end user. But the current stable extension was not asking me this for some reason, and the first few times I launched the Preview version of the extension it did not prompt me either. Is there a way we can manually set the extension working directory if not prompted? |
Additionally, after setting the plugin working directory, removing the preview extension, and installing the stable extension |
I found the extension setting for setting the working directory in the workspace. I tested setting this to a different location than I picked in the prompt and the PS extension continues to work fine. If you don't get the prompt to pick a working directory for the plugin, the following setting is where you can set this: "powershell.cwd": "c:\\path\\to\\working\\directory\\" I have this set now to my root workspace folder. To re-state, if you don't get prompted to set the extension working directory and the extension fails to load, setting the above setting in your workspace should fix this issue (don't forget to use a real path). |
I think I need to get the preview extension out sooner rather than later 😆 The setting is |
|
@bender-the-greatest what's your workspace file that repros this? Would be very helpful. I want to get a proper try/catch for this and for #4135 into the preview before rolling it to stable. |
I have multiple folders added to the workspace if that's what you mean. In the
That was someone else, I have multiple folders added to my workspace. |
I don't think the workspace file will help at this point. The issue seems to have been that |
Alright, while I can't reproduce the prompt not appearing at all anymore, I can replicate the erroneous extension behavior by clicking away rather than selecting a working directory when two or more folders are added to the workspace, and repro-issue.code-workspace{
"folders": [
{
"name": "ChocolateyPackages",
"path": "ChocolateyPackages"
},
{
"path": "scratch"
}
]
} |
Ok, new preview will be out momentarily. Could you please confirm you can no longer repro this? |
Prerequisites
Summary
The current version of the PowerShell plugin does not load when I open
.ps1
files any longer. When I try to launch the integrated terminal withPowerShell: Show Extension Terminal
from the command pallete, I get the following error (re-stated from title):Rolling back to the prior version fixes this (albeit with the old
PowerShell Integrated Console
name for the terminal). I've found at least one other person today experiencing the same issue. I've also tried the relatedPowerShell: Restart Current Session
command which results in a similar "command not found" error.Recently-created issue #4135 seems like it could be related although it's for a specific plugin feature. My issue here is that the terminal not launching causes the plugin to entirely not function.
PowerShell Version
Visual Studio Code Version
Extension Version
Steps to Reproduce
Open
.ps1
file for editing.No plugin features are available. Quick evidence of this is no syntax checking is performed against the opened file.
Try to open the plugin terminal with the
PowerShell: Show Extension Terminal
pallete command. Modal dialog with the following error is displayed:Visuals
No response
Logs
No logs are generated when running
PowerShell: Show Extension Terminal
from the command pallete. I set logging toDiagnostic
before attempting this.The text was updated successfully, but these errors were encountered: