Visual Studio Code - Terminal Blank Screen

TerminalVisual Studio-Code

Terminal Problem Overview


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 and back again
  • Adding a new Command Line Shell

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

Terminal Solutions


Solution 1 - Terminal

My solution for VSCode 1.39.2 with Ubuntu has been:

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

Solution 2 - Terminal

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.

Solution 3 - Terminal

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

Solution 4 - Terminal

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

Solution 5 - Terminal

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

Solution 6 - Terminal

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

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

Solution 7 - Terminal

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

Solution 8 - Terminal

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

Solution 9 - Terminal

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.

Solution 10 - Terminal

The following helped for me in windows10.

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

Solution 11 - Terminal

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.

Solution 12 - Terminal

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!!

Solution 13 - Terminal

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.

Solution 14 - Terminal

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.

Solution 15 - Terminal

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 bug Sometimes 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.

Solution 16 - Terminal

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.

Solution 17 - Terminal

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

Solution 18 - Terminal

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

Solution 19 - Terminal

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionWeb Develop WolfView Question on Stackoverflow
Solution 1 - TerminalFranciscoView Answer on Stackoverflow
Solution 2 - TerminalalbeheryView Answer on Stackoverflow
Solution 3 - TerminaljithinView Answer on Stackoverflow
Solution 4 - TerminalArjjunView Answer on Stackoverflow
Solution 5 - TerminalWeb Develop WolfView Answer on Stackoverflow
Solution 6 - TerminalRami IsmaeilView Answer on Stackoverflow
Solution 7 - TerminalSunnyView Answer on Stackoverflow
Solution 8 - TerminalMohsin MahmoodView Answer on Stackoverflow
Solution 9 - TerminalDivumarcusView Answer on Stackoverflow
Solution 10 - Terminalrajkumar21View Answer on Stackoverflow
Solution 11 - TerminaldelyexView Answer on Stackoverflow
Solution 12 - TerminalHrishikesh KaulwarView Answer on Stackoverflow
Solution 13 - Terminalcoder_shanksView Answer on Stackoverflow
Solution 14 - TerminalalpersunterView Answer on Stackoverflow
Solution 15 - TerminaltfrascaroliView Answer on Stackoverflow
Solution 16 - TerminalMohamed Riadh BEN HMIDAView Answer on Stackoverflow
Solution 17 - TerminalKoffi Anderson KoffiView Answer on Stackoverflow
Solution 18 - TerminalByusaView Answer on Stackoverflow
Solution 19 - TerminalAakashView Answer on Stackoverflow