How to use the WSL and CMD terminal from VsCode terminal? - visual-studio-code

I can only use the bash, tmux, and javascript debug terminal in VsCode. I can't use the CMD and WSL terminal.
I tried to change it in the default terminal profile but there's no CMD and WSL there.

Press on Configure Terminal Settings and open setting.json file and add this line
"terminal.integrated.defaultProfile.windows": "Command Prompt",
Go to VSCode to learn more about terminal integration.

Related

How to open an "Integrated Terminal" in VSCode from a gnome terminal

I was wondering if it is possible to launch an "Integrated Terminal" in VSCode from a command line in linux outside of vscode.
Ex: I have vscode open and I have a gnome terminal open beside it. I want to run a shell script in the gnome terminal to create a new "Integrated Terminal" in VSCode.

Can't open a Cmder terminal on VSCode (only powershell) since last update

Since one of the last updates of VSCodem, I am unable to open a Cmder terminal, even with cmder specifically indicated as my terminal client.
settings.json
"terminal.external.windowsExec": "C:\\laragon\\bin\\Cmder\\Cmder.exe",
"terminal.integrated.env.windows": {"CMDER_ROOT": "C:\\laragon\\bin\\Cmder"},
"terminal.integrated.shell.windows": "C:\\WINDOWS\\system32\\cmd.exe",
"terminal.integrated.shellArgs.windows" : ["/K","C:\\laragon\\bin\\cmder\\vendor\\init.bat"],
It only opens a powershelll terminal and cmder doesn't even appear on the dropdown options list on the add terminal button.
If I manually launch the cmder in windows and them press the CTRL+ร‡, it will focus on the external window and will not open a terminal inside vscode.
Anyone had this problem? I can't figure it out... microsoft again doing what it does! I don't want powershell, I want cmder...
Thank you for any help!

VSCode terminal in ubuntu wsl

I've run into an issue where when I open vscode through WSL (command code.) it opens VSCode with no terminal whatsoever and there's no option to open one.
Terminal on WSL Ubuntu:
But when I run vscode from Windows I do have the option to use my Ubuntu terminal
Terminal on Windows:
Has anyone had similar issues? Did I miss a setting somewhere in VSCode?

Redefine Terminal does not work when starting VS Code

I can live with it, but...
I have changed the terminal from PowerShell to git bash in the settings:
"terminal.integrated.defaultProfile.windows": "Git Bash"
This does its job. When I create a new terminal, it is git bash by default.
However, when I start Visual Studio Code, it opens with a PowerShell terminal. (All new terminals are git bash terminals.)
To set the default terminal in VS Codem , you should follow this steps:
Open VS Code
Press CTRL+Shift+P / โ‡งโŒ˜P and search for terminal select default shell
Make your selection and press enter (In my case I chose Git Bash)
All of your new terminals will now default to your choice ๐ŸŽ‰
I hoped this helped you.

Using WSL through CMDER in VSCODE

I have setup WSL in CMDER through settings->Startup->{WSL::bash} and also made it my default shell, so whenever I open CMDER it starts in WSL.
I integrated CMDER into VSCODE using https://github.com/cmderdev/cmder/wiki/Seamless-VS-Code-Integration and it is working. But the CMDER version opening inside VSCODE is not the default WSL shell.
How can I setup CMDER with WSL as shell, inside VSCODE?
I found the solution, I got the WSL shell with CMDER in VSCODE by adding the following in settings.
{
"terminal.integrated.shell.windows": "path\\to\\cmder\\vendor\\conemu-maximus5\\ConEmu\\wsl\\wslbridge.exe"
}
CMDER tab shows wslbridge.exe when I open WSL shell in CMDER. So I searched for wslbridge.exe inside CMDER folder and added the path in VSCODE settings and it worked.
I am not sure if this is the perfect solution or if this causes any issues in the future but it works for now.