I've been using Visual Studio Code since it was in beta and one of the features I like best about it is the integrated terminal for using the Angular CLI in app. I've had it working fine since I had the laptop, but I re-installed Windows 10 over the Xmas break and obviously as a result had to re-install Visual Studio Code.

Since then I've had issues with the Terminal, it's blank until you hit return, at which point you see the path, but not the usual copyright notice you should get from the Windows Command Line.

Before hitting return:VS code Terminal 1

After hitting return:VS Code Terminal 2

And this is what I was expecting directly from the Windows 10 Command Line:Windows Terminal

So far I've tried the following:

  • The usual Windows shut down / restart
  • Re-installing VS Code (even changed from regular to insiders)
  • Changing the default Command Line Shell from CMD to Powershell andback again
  • Adding a new Command Line Shell

Is there anything else I can try? Has anyone else encountered the same issue?

22

Best Answer


My solution for VSCode 1.39.2 with Ubuntu has been:

File -> Preferences -> Setting -> Features -> Terminal -> Inherit Env

I have the same problem with PowerShell even after installing the 1.32.1 update. I fixed it by going to PowerShell options and checked the "Use legacy console" option and now it works as it should and I thinks it should work with cmd too.

I had the same problem in visual studio code 1.41.1 in ubuntu 18.04,I solved it by editing the settings.json by going through settings and search for 'Inherit Env'and opening Edit in settings.json and changing

"terminal.integrated.inheritEnv": true

The screenshot is provided below

screenshot

Here is the fix:

  1. CLick bottom left setting wheel
  2. go to setting > Features > terminal
  3. Select Explorer kind: Intergrated
  4. Change inheritEnv to true.enter image description here

After some research I've found that this is a bug in VS Code with the application they use to integrate the shell. Looks like Android Studio has the same issue too. You can read about the more specific how / when / what etc. here:

https://github.com/Microsoft/vscode/issues/57803

This has been fixed on the insiders release that landed for me today (08/01/2019), not sure when this will be rolled out to the general release (if not January then I would imagine it might roll out in February barring no further issues).

So for anyone else still getting this issue, update to the latest version of VS Code. If you have done and you're still getting the same problem you can check and report issues here:

https://github.com/Microsoft/vscode/issues

Fixed Terminal Window

I have the same problem with PowerShell, Gitbash, etc. with code version 1.36.0. See Version info1

I could clear the problem with the following steps:

  • Open PowerShell in admin Mode. 2

  • At the bottom of the item Legacy console is a checkbox, which is selected by default.

  • Deselect this option then Save. 3

  • Reboot Code Finally, the console appears as expected.4

Inside the terminal window, Press Ctrl + c and hit enter

Though it's not a permanent solution but its a quick fix to get the juice flowing while you are working with VSCode

Remove the following line in settings.json file

terminal.integrated.inheritEnv": false,

You can locate settings.json file in the following locations —

  • Windows %APPDATA%\Code\User\settings.json
  • macOS $HOME/Library/Application Support/Code/User/settings.json
  • Linux $HOME/.config/Code/User/settings.json

This works for me. Tested in windows 10

Right click and open the properties of visual studio code short cut.

  1. Add --disable-gpu to the end of Target.
  2. And in the compatibility tab, uncheck compatibility Mode and click OK.

Then Rerun the visual studio code application. It should work.

enter image description here

Reference:https://www.youtube.com/watch?v=2835_ZJGCQA

I had the same problem while working on CMD in my VSCode. I fixed it by going to the Terminal Menu in the VS Code and selected New Terminal. And a new cmd terminal opened up and it working just fine.

VS Code prompted a dialog at bottom right corner recommending me to switch the RenderType option to dom, because it felt it was running slow. Then the blank-terminal issued was gone.My environment was a vm of Ubuntu 16.04 running on win10.

Here is the fix for Code in Ubuntu-18.04 :The issue doesn't appear when opened through the terminal.Go to the settings in the bottom left and search for "terminal.integrated.inheritEnv".Check the box for this in user section that way terminal will inherit user's environment. Done!!

This is the only thing that worked for me.

Change this configuration:

File -> Preferences -> Settings, search for terminal.explorerKind, edit to external

or just edit the json file

"terminal.explorerKind": "external"

When VSCode prompted me telling me that using integrated was better, I followed its advice and switched. But a couple of days ago it started being very weird, in that it left a space between the actual prompt and whatever I was writing, like this:Weird vscode integrated prompt bugSometimes the spacing left was of more than a dozen lines. It got instantaneously fixed once I switched back to external.

PS: This was also the case with Microsoft's Powershell terminal. I don't know if other terminals have the same issue under Windows.

On Mac OS, quitting VS Code with (CMD + Z) and restarting it resolved the issue for me.

Same issue occurred for me and I browsed through the VS Code issues on GitHub.Here is the solution I found: https://github.com/microsoft/vscode/issues/53782#issuecomment-414919965

Change terminal.integrated.rendererType back to canvas in VS Code settings and issue does not reappear.

The solution for me was to uninstall the user mode and instead install system mode. This is what Jenuel Ganawed stated and I don't know why that post is downvoted. It solves the issue in my case.

I was experiencing the same issue. I upgraded to the latest version of VSCode 1.42.1, but that didn't resolve it. It seems that the issue has to do with Powershell 2.0, so I removed it:

Control Panel->Programs and Features->Turn Windows features on or off->Windows PowerShell 2.0 (disable it).

This resolved the issue for me.

On Linux try to kill the integrated terminal (right click and "Kill Terminal") and reopen it again ("ctrl-`").

Make sure you exit out of the existing terminal window. It will try to recover it and even though you may have closed out of VS Code you want to close the terminal window as well

on my case this solved the issueFile -> Preferences -> Setting -> Features -> Terminal

All that was needed for me was to close all VS Code instances!

I found the reason this happens the GPU doesnt properly render the terminal the fix is to stop VS-code from using the gpu. (WARNING: If your code needs GPU dont use this Fix).

FIX:https://gist.github.com/andriyudatama/fe5d00deb36feeea30ef35a5ea0f7eff