-
Notifications
You must be signed in to change notification settings - Fork 488
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
Never ending loop to trying to activate extention when trying to run PS script #5045
Comments
Thanks for the submission! Could you submit us some logs so maybe we can see something? Have you also tried disabling your profile in the settings? |
I apologize, I mainly use VSC for running PowerShell...so I'm not very familar with all the configuration settings for it. I have attached a few of the logs...hopefully that can help. Thanks! Just to clarify, I have no problem copying the body of a script from the Editor Panel and pasting into the Terminal Panel tab on the bottom...it runs fine that way. It just seems like the extension service is having trouble initializing and connecting to VSC so it won't run that script if I choose if from the Side Bar/Explorer and press the run button. |
@jason-collab do you have a powershell profile? Can you clarify how did you start the extension? Do you have trouble with any other extensions? Thanks! |
Nope...I don't have a PowerShell profile. I just run the default. Here is my VSC settings.json: I usually just need to launch VSC, click on a script in the side bar explorer, and press the run button. For about the past month or so, the PowerShell extension just won't fully activate. It just keeps initializing. So, I have been resorting to copy/paste into the Terminal panel of VSC at this point. I haven't had any trouble with other extensions. I even tried the Start Extension Bisect suggestion in this article and it only finds a problem with the PowerShell extension. |
@jason-collab I'm not seeing anything in the logs, looks pretty normal, not sure what it would be hanging on. Have you tried starting a new |
Does the same occur on another computer? I unfortunately cannot reproduce this in any combination and without a solid reproduction we have no way of knowing how to fix it. |
Well, I know that our organization implemented BeyondTrust about 6 months ago...but I don't know anything about it. Any idea if that could be causing the issue? I wouldn't think so since I can still run PowerShell from the VSC terminal. But could that be hanging up the extension perhaps? |
Certainly these kind of intermittent or "immediate death" issues can be caused by antivirus and other products seeing pwsh.exe as a threat and halting the execution. Would have to check the logs of the relevant products to be sure. |
Well, I found this #3077. Although it is not the exact same issue, I tried to run VSC as administrator and it finally worked for me now. I never had to do that before. So, I'm guessing BeyondTrust is causing some kind of problem there. However, for the sake of time, I'm not going to go down the rabbit hole of trying to find out why. It looks like that could be pretty time consuming. I'll just run as administrator from now on. Thanks for help @JustinGrote 👍 . |
Type: Bug
Even with simple scripts, the PowerShell extension does't appear to ever fullly activate...just loops. VSC and all extensions are up to date. It even occurs for a simple script like as follows:
Connect-MicrosoftTeams
Get-CsOnlineUser -Identity
Extension version: 2024.2.2
VS Code version: Code 1.93.1 (38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40, 2024-09-11T17:20:05.685Z)
OS version: Windows_NT x64 10.0.19045
Modes:
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: