VS Code Terminal Disappearing - visual-studio-code

When trying to run a file or just open the terminal in VS Code, the terminal opens for a half second and then promptly closes without error messages.
I've tried updating VS Code, and external libraries/environments. I'm thinking I might need to fully uninstall and reinstall, but hoping there is a easier fix.

Related

VS Code integrated terminal exits with native exception (code 216)

Every time I try to open the terminal in VSCode it immediately fails with this error:
I tried uninstalling re-installing vscode, and disabled all my extensions, but it still happens. There is nothing I've changed right before it started occurring.
Colleagues in my organization do not suffer from this so I don't know if it has something to do with our IT dept.
the version of vscode I use is 1.70.0
my default terminal is Powershell. It does work when changing the default terminal to CMD.exe
Opening Powershell on its own does work properly.

VS Code Terminal command extra first letter

In vs code terminal I'm getting first letter of command twice. it's not causing any problem but it's kind of annoys me to watch the wrong command. I'm not writing any letter twice, the first letter of all commands gets repeated automatically.
as you can see there are 2 commands first one ppython first p automatically got repeated even though i wrote python it makes it ppython. and the first p that got repeated won't delete from there even if i spam backspace so many time . the I tried to clear the command till first p and as I'm not able to remove first p from terminal I just wrote ython in front of it. it looks proper now python. but I got a error response as ython is not recognized command. this same happens with other commands too like cd converts to ccd.
Edit : I Re-installed vs code then but that didn't resolved my problem, when I installed it again all my extensions were there already installed then I deleted vs code again then went to the vs code's location there was a folder name .vscode I deleted that then installed vs code again now all the extensions were deleted from vs code but I'm still having the main problem . that doesn't resolved it. and I'm not getting that error while using other terminals like git bash and I'm getting this error only when I open python file's folder not when I open a react app folder or normal js or other language.
I also tried reseting the default setting from setting.json file as one of the answers suggested but that doesn't worked.
It's hard to answer this without knowing your configuration. What plugins have you installed? Try disabling those related to the terminal emulator one by one to see if they're causing any issues.
In doing this, you would naturally restart the terminal emulator as well. If the problem persists, check if you get this erroneous doubling on a terminal emulator outside of VS Code (Terminal or PowerShell).
If nothing works, try reinstalling the interpreter and also VS Code. Especially the latter, if this seems to affect only the terminal emulator within VS Code.
It's really hard to answer your question without knowing your vs code configuration setting.
The easiest way is you can reset your vs code to default
The Steps
Go to View > Command Palette or press Cmd + Shift + P (macOS) or Ctrl + Shift + P (Windows).
Search for open settings json and select Preferences: Open Settings (JSON) which show ups from the result list.
If you’ve been working with VS Code for a while and installed a lot of things and made a lot of changes, you’ll find there’s a lot of stuff in this file:
Delete everything inside the root braces and save the file
Relaunch your VS Code.
(This step is optional) In case you want to not only reset VS Code but also remove all installed extensions:
Delete the ~/.vscode/extensions folder if you’re on a Mac.
Delete the %USERPROFILE%.vscode\extensions folder if you’re using Windows.

VSCode launches wsl.exe processes which are not terminated after VSCode is closed

Lately, after I have been using VSCode for some time, opening and closing it repeatedly, I was surprised to see, in Process Explorer, a lot of wsl.exe processes. As it looks, 4 or 5 processes were started by VSCode each time I opened it, but were not terminating when I was closing VSCode, so I ended up with a lot of them (there are only 5 in the image, but actually there were several dozens).
I think this has something to do with the following dialog box I see (almost?) every time I open VSCode
(which I was just closing since I am not interested to install these extensions).
Does someone know how to disable the launching of these processes? I had a Docker extension which I uninstalled, but this behavior persists.
Ok, so the culprit is not this something which launches the dialog box (I still see it), but it appears to be the following setting (when checked)
After unchecking it, I don't see now any wsl.exe processes launched when I start VSCode.

Visual Studio Code terminal commands deletion

I was messing around in python and ran a few programs from terminal and noticed that using the up arrow you could backtrack to previously ran program. I thought this was a nice feature but I'm wondering where and which file I have to edit to delete past commands?
Note: Restarting VS Code doesn't remove these commands from terminal history

CMD-K in Visual Studio Code

I often clear the terminal on macOS with CMD-K (sort of equivalent to reset). When I use the terminal in Visual Studio Code and I press CMD-K, the banner at the bottom of the screen shows "(CMD-K) was pressed. Waiting for second key of chord..."
How can I make CMD-K pass through the editor to go to the terminal in Visual Studio Code?
I have occasionally run into this bug (VS Code on MacOS) and each time it randomly would fix itself until recently it kept persisting even through restarting my laptop. I have now found that closing all open projects seems to fix this issue for me.
Might be related to how VS Code stores your current workspace state (opened projects and file modifications). It seems maybe these state settings sometimes get corrupted somehow 🤔