18

I just did a fresh install of Windows 10 Pro version 1903 build 18362.116 and Visual Studio Code. Now the integrated terminal only launches externally.

Pressing Ctrl + ~ results in this.

vscode non-integrated terminal

What am I missing? How do I get it to open integrated again?


EDIT

After working with VSCode team it is a verified bug. See the Github issue here. I posted the workaround as an answer here.

Community
  • 1
  • 1
GollyJer
  • 23,857
  • 16
  • 106
  • 174
  • Possible duplicate of [Switch focus between editor and integrated terminal in Visual Studio Code](https://stackoverflow.com/questions/42796887/switch-focus-between-editor-and-integrated-terminal-in-visual-studio-code) – Jim G. May 23 '19 at 02:05
  • Definitely not a duplicate. Posted more details in the question and added a workaround as an answer. – GollyJer May 23 '19 at 02:15
  • To save others like me some time: if you use Cmder, make sure it's not running. If it is running, toggling the Terminal in VS Code will switch to the Cmder window. If Cmder is not running, Ctrl + ` should toggle the integrated terminal. – Arthur Sep 17 '19 at 12:35
  • @Arthur, I am still facing the issue. Have you figured out a solution yet? – Manav Saxena Aug 23 '20 at 13:17

5 Answers5

65

OK, worked through this one in VSCode repo issues.

For now, until it's fixed, turn off ConPTY integration in the User Settings.

vscode conpty setting

GollyJer
  • 23,857
  • 16
  • 106
  • 174
4

The issue now says use legacy console. To change the setting open a cmd prompt. Right click the title to bring up properties.
cmd properties

Then Uncheck 'Use legacy console'
Use legacy console

Brian
  • 78
  • 5
  • This is the write option for open integreated terminal in vs code. When i uncheck the last checkbox the terminal open in vs code not in cmd windows separate from vs code. – andrei0292 Feb 07 '21 at 12:38
3

To change the integrated terminal on Windows, you just need to change the terminal.integrated.shell.windows line:

  1. Open VS User Settings (Preferences > User Settings). This will open two side-by-side documents.
  2. Check if "terminal.integrated.shell.windows" has value "C:\\Bin\\Cmder\\Cmder.exe" setting to the User Settings document on the right.
  3. Remove this line.

Ctrl + ~ will now open integrated terminal of VSCode.

If the above solution doesn't work then can you try below values and check if it works for you:

// Command Prompt

"terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe"

// PowerShell

"terminal.integrated.shell.windows": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"

// Git Bash

"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe"

// Bash on Ubuntu (on Windows)

"terminal.integrated.shell.windows": "C:\\Windows\\System32\\bash.exe"

From the Command Palette (Ctrl+Shift+P), use the View: Toggle Integrated Terminal command.

Try custom shortcut:

[
    {
        "key": "ctrl+`",
        "command": "workbench.action.terminal.toggleTerminal"
    }
]
Ank
  • 786
  • 1
  • 5
  • 14
  • Thanks for the answer Ank. But it doesn't work. If I clear that setting (which had the path to cmd) vscode then opens powershell (the default Windows shell) in a separate window. – GollyJer May 15 '19 at 18:24
  • I have updated the answer. Try it out and let me know if this works for you. – Ank May 15 '19 at 19:43
  • Yeah... all those open the correct shell but they all open *externally*. The problem is they aren't being integrated into the integrated shell of vscode. – GollyJer May 15 '19 at 20:02
  • From the Command Palette (Ctrl+Shift+P), use the View: Toggle Integrated Terminal command. – Ank May 15 '19 at 20:05
  • No, sorry. That's the same as typing `ctrl` + `~` – GollyJer May 15 '19 at 20:16
  • Putting "terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe" in settings.json worked for me – Stefan Mar 02 '20 at 00:29
1

Had this problem fixed. Found the solution from the VS Code support.

for error:

Terminal exits with code 3221225786 (or similar)#

"This can happen when you have legacy console mode enabled in conhost's properties. To change this, open cmd.exe from the start menu, right-click the title bar, go to Properties and under the Options tab, uncheck Use legacy console."

enter image description here

source: VS Code docs

designdust
  • 109
  • 1
  • 4
0

enter image description here

I changed the above settings to make it open internally might need to restart VS Code

hghew
  • 311
  • 2
  • 4
  • 15