Error when launching Terminal in Visual Studio Code (terminated with exit code: 3221225477) - visual-studio-code

I'm a new user of Visual Studio Code and I came across the following error (see below) when trying to launch a Terminal inside VS Code.
The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe" terminated with exit code: 3221225477.
I've tried fixing this by following the instructions on [Visual Studio Code Troubleshoot Terminal] (https://code.visualstudio.com/docs/supporting/troubleshoot-terminal-launch) and also going through the Get Started documentation on the Visual Studio Code website.
I've also tried copying the error message and pasting on Google to search for a solution but only one relevant site came up here and I still could not find a fix.
I'm using a Dell XPS machine running Windows 10 (x64) and Visual Studio Code 1.51.0 (x64 UserSetup).
Can someone please assist? Thanks in advance!

Try the following:
If your computer is running powershell, turn it off.
Control Panel -> Programs -> Turn Windows features on of off
Search Window Powershell 2.0 -> Uncheckbox -> OK
Restart

Related

AutoHotKey doesn't start program out of Visual Studio Code + AutoHotkey Extension

I want to make a script with Visual Studio Code and AHK that starts a certain program (automatically connect to a VPN ==> FortiClient).
If I double click directly on the script only containing that specific ahk run command in Windows Explorer, the client starts as desired. From Visual Studio code nothing happens.
I tried:
run, %programfiles%\Fortinet\FortiClient\FortiClient.exe
==> Works with double click from Windows explorer. Running from VS Code: nothing.
run, C:\Program Files\Fortinet\FortiClient\FortiClient.exe
==> Works with double click from Windows explorer. Running from VS Code: nothing.
I made a link to the exe an put that to a folder without a blank character in the directory name:
run, C:\Software_Checkout\AHK\FortiClient_Verknuepfung.lnk
==> Works with double click from Windows explorer. Running from VS Code: nothing.
What can be the reason for this?
I am unable to reproduce, so I'll give a dumb suggestion. Complete shot in the dark, but make sure you're not starting VS Code from under WSL. I've made that mistake in the past, the head scratches were plentiful. Other than that, I don't know what could be the issue. Maybe a faulty debugger?
Example script that works for me from VS Code, with several debuggers:
ProgramFilesX86 := A_ProgramFiles . (A_PtrSize=8 ? " (x86)" : "")
run %ProgramFilesX86%\Microsoft\Edge\Application\msedge.exe

VS Code opened via VS Developer Command Prompt not recognizing 'cl'

As the title says, VS Code is not recognizing cl compiler although opened via Visual Studio 2022 Developer Command Prompt:
VS Code terminal:
I have tried using VS Code external terminal with %comspec% /k "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat"
which did not work.
Setting the comspec manualy in the terminal did solve the issue for the terminal instance:
But the C++ extension is still complaining about cl.exe:
cl.exe build and debug is only usable when VS Code is run from the Developer Command Prompt for VS.
I have never used VS Code for C++ before and I don't use windows for development at all so go easy on me.
What could be the reason for the issue and how it can be solved?
Visual Studio Developer Command Prompt must be elevated(run as Administrator) in order to correctly open VS Code with the needed permissions.
Running Visual Studio Developer Command Prompt as Admin solves the issue.
One solution that worked for me is to go directly in the setting for C++ extension and find compiler path setting, and manually set it to cl.exe path on your computer.

Visual Studio Code causing blue screen of death on Windows

I have Visual Studio Code version 1.22.2 running on Windows. When working on Javascript code, it crashes and causes a blue screen with the following technical info:
STOP: 0X0000007E
mfeavfk.sys - Address <...>
I have a plugin for MS SQL and a beautify plugin installed.
I recently updated Windows and started experiencing BSODs every time I started VS Code. Here's how I fixed it - hopefully this helps someone else:
Open a command prompt and type the following command:
code --disable-extensions
If your computer doesn't BSOD after this step, then an extension is likely causing the issue.
Press ctrl+shift+x to open the extensions sidebar
Under disabled, uninstall any extensions you aren't using or don't recognize.
Restart VS Code, and see if it still crashes.
If step 3 didn't help, try removing all extensions and then reinstalling one at a time until you find one that causes the crash. Then repeat steps 1-4, this time removing the extension you identified as causing the crash.

How to turn off the beep on save in Visual Studio Code?

Visual Studio code has a double beep when saving a file that's particularly penetrating when wearing headphones. There doesn't appear to be a setting for it in the settings.
I did find a suggestion that it can be done in PowerShell with:
Set-PSReadlineOption -BellStyle None
but entering this in the terminal window of VS Code returned an ObjectNotFoundError.
Edit: I've discovered the problem is with PowerShell. I have a PowerShell window open to run the Angular 5 website and it's this that is beeping. I discovered this by switching to Visual Studio 2017 to edit the website and that happily beeped away on save too.

Visual Studio Code - Dialogs open in Background

I am using the Powershell extension for Visual Studio Code and when I try and run cmdlets which bring up a form dialog (e.g. Running connect-AzureAD ) these will open in background behind the VS Code window and cannot be seen.
Does anyone have a fix for this?
Try the following workaround i found on the issue page https://github.com/microsoft/vscode/issues/146422#issuecomment-1177157781.
Before opening Visual Studio Code, type the following on your terminal
GTK_USE_PORTAL=0
Tested on Fedora 37, Xorg