-
Notifications
You must be signed in to change notification settings - Fork 513
Unable to run scripts with integrated PowerShell Console in VSCode 1.47.1 #2808
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
I have this problem too when i am running vscode as admin. I works when running as my normal loggedon non admin user |
I am able to reproduce this issue in 1.47 with both stable and preview extensions, but insiders (1.48) does not appear to have the issue with preview extension. To be clear: I am only able to reproduce by creating a secondary account on my computer, and running elevated in that account as opposed to merely running elevated. I'd wager a guess that the issue would occur when just running as the different user, but since I have a user based install, I have to elevate it in order to access the files to run. |
Yeah, to clarify, I'm running a per-system install of VSCode. I can confirm, installing the Insiders version of VSCode (1.48.0-insider), also does not exhibit the problem, not sure if this version already contains the CVE patch. |
Also to clarify. Per-system install and company requires separate accounts for user and admin. So launching VS Code as administrator. |
+1Per-system install and company requires separate accounts for user and admin. So launching VS Code as administrator. |
Thanks everyone, sorry to hear that you are hitting this it would be really helpful if you could also attach the logs--instructions for how to do that are here , it would also be great if you could see if you are able to open a terminal in VSCode |
Hey @SydneyhSmith it appears when enabling the Diagnostic logging no log files are being produced within the folder you mentioned? I see logs from this AM but nothing from when i opened and closed several times just now. When using the keyboard shortcut to open the folder (mentioned in the link you sent) i get the following error, any ideas? Just to note i am launching as a local admin account from a standard user account as mentioned above.
|
I'm seeing the same on my end as well. I can hit the + icon to start a new PowerShell terminal, and I can run commands. I enabled diagnostic logging, but when i try to open the logs folder from within vscode, I get the same error as above. Manually browsing to the logs directory shows no new logs generated since upgrading to v1.47.1 |
So odd... it doesn't seem like the PowerShell extension is being loaded... If you open the command pallet, can you run "Toggle Developer Tools" and give us the output? |
Seeing this in the console of the developer tools
|
so the top 4 are fine but that last one is very odd... I'm very suspicious of that CVE too, although it's hard to pinpoint where the problem is from that error message... Have you tried with today's insider build? I might ask you to wait for tomorrow's to see if that puts insider in a bad state too. If it does, I need to chat with the vscode team on what changed. |
Actually this is an issue by "design" and also strongly related to the Security Fix CVE in 1.47.1. Its not just a side effect. The security fix addresses the security related issue that we take advantage in general by the Powershell Integrated Console. The PG should think of this security coliding architectural design. |
Has anyone tried the latest insider build? Does it still work? |
I just installed the latest insiders version, confirmed it still works when running as admin and launching with my secondary account. Version: 1.48.0-insider (system setup) |
The date says today... it's very possible that we just need to wait for the next stable release... Let's see how insiders does over the next few days. Also, lets see how stable does in the next patch release. |
@SydneyhSmith - do you still need logs? +1 reproducible for me, running as different user w/ more permissions in a work/enterprise environment. |
Also, I wonder if this might point to a needed UI change? If an extension fails to load on startup, I would expect to see a warning somewhere besides just the troubleshooting logs. |
This appears to be a dupe of microsoft/vscode#102642 |
This might be a good thing to look into. As far as I can tell, the extension is loading, but the language services aren't loading. Perhaps somewhere in the language service startup it could pop a message if it failed. Currently anything the relies on the language service checks and pops a message at that point, but definitely knowing before you get to that point would be helpful. |
Looks like the fix will be out shortly see-- microsoft/vscode#102642 (comment) |
Since upgrading to v1.47.1 of VSCode, I can't run PS scripts using the built in console. Hitting F5 does nothing, and attempting to run a line of code using F8 gives an error: "command 'PowerShell.RunSelection' not found"
I also notice that the version of PS is not displayed in the bottom-right.
I suspect this has to do with the latest CVE patch.
https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/CVE-2020-1416
My question is, am I doing it wrong? Or is this a bug that needs to be corrected? In my scenario, I have a regular (non-admin) account I use to login to my workstation. Depending on the PowerShell task/script, I may need to run VSCode as my secondary (admin) account (with elevated rights). To do that, I'll first run powershell.exe 'As Different User', authenticate with my secondary admin account, then run VSCode as admin (Start-Process code.exe -Verb RunAs) to get into an elevated session.
The text was updated successfully, but these errors were encountered: