VSCode on Linux Mint, integrated terminal not able to type anything - visual-studio-code

Hi I'm running Linux Mint 19 and I have just installed vscode using the snapd package manager. I've not used vscode on linux before as my usual editor is emacs. However, on a fresh new install of vscode, the integrated terminal does not work, there is just a non blinking cursor in the top left of the screen, but no prompt and no keyboard strokes are registering. This appears to be a common problem as there are a lot of posts about it if googled, but they are all for Windows versions and none of the solutions that I'm able to try do anything. I've tried to open a new terminal window, but the same thing happens I just get two terminal windows that I now cannot use. I've also tried checking the box that says Code-runner: Run In Terminal, but that does nothing either. What can I do to get this to work please, I looks to me like it is just not connected to either a bash or Zsh(which I normally use). Any help on this would be appreciated.

Instead of starting vscode with its default shell script (usually located on /usr/share/code/bin/code), the integrated terminal only works for me when starting it directly from the compiled binary (typically found on /usr/share/code/code, which is the same as the launcher created by the installer:
/usr/share/code/code --no-sandbox --unity-launch %F
While I searched for a solution in the past I've also noticed that lots of folks solved similar problems just by adding --disable-gpu flag, so might be worth checking out as well.

Related

VS_Code : Shell Integration Failed To Activate

When i hover on my vscode terminal name: (in terminal's upper right corner named "Powershell")
it shows : shell intergartion failed to activate,
how to solve this error, while
I tried installing vs code again but still no change, and also installed powershell 7
There are a few potential solutions for this issue.
Make sure that you have the latest version of VS Code and the Shell Integrate extension installed.
Check that the integrated terminal in VS Code is set to the shell you want to use (e.g. PowerShell, Command Prompt, Bash).
Try running VS Code as an administrator.
If you are using Windows, try adding the path of the shell you want to use (e.g. C:\Windows\System32\bash.exe) to the "terminal.integrated.shell.windows" setting in your VS Code settings.
You can also try reinstalling vscode and the extension.
If none of the above solutions work, you can try searching for specific error messages in the output panel of vscode or in the output of the terminal.

Elixir: VS Code ExUnit cannot find Mix

I cannot load or run my tests, from within VS Code.
I'm a new user to Elixir, and to VS Code. I'm running Lubuntu 21.10 (Impish). I've downloaded Erlang/OTP 25 (.deb), and Elixir 1.14 (precompiled binary in /usr/share/elixir), and can get anything I need running in a Bash terminal. Again, in a standard QTerminal window,
erl, iex, mix, elixir, etc. all work fine.
In VS Code, however, I get some errors. I feel stupid, but I'm coming from Sublime Text, so please forgive me.
In the left pane of VS Code, ExUnit shows an error (red):
Clicking on this error gives me this, on the bottom right pane. The command line options, passed to mix test, seem to be the default configuration:
This result is bizarre to me, because I can open the integrated terminal, execute /bin/sh, and then run the exact mix test line that's displayed:
/usr/share/elixir/bin has been added to my PATH variable, in ~/.bashrc, ~/.profile, and /etc/environment.
However, I am further confused by all tests being excluded, and wonder if there's some connection to the core issue:
Note that I can run my tests just fine, using different command line options. I've tried adding tags, but that didn't fix the problem.
I tried Google'ing this, and played around with my settings. Here is what I have configured in the "User" settings.json, and I made sure nothing overrides this in "Workspace" settings:
Changing the useNativeTesting setting doesn't solve the problem.
On another (?) note, I get a "failed to run elixir" upon VS Code startup:
Again, I have no problem running commands from a Linux terminal, or from a terminal within VS Code.
Plot twist: If I remove the precompiled Elixir 1.14, and downgrade to an older version, via apt, the problem goes away. But Lubuntu 21.10 doesn't offer Elixir 1.14, and I'm really into using the new dbg() feature.
But for now, I cannot load or run my tests, from within VS Code, apparently because Mix cannot be found.
Thanks to Daniel Imms, from the VS Code team, for answering my question on Twitter:
"Try moving where ever you init mix and elixir (.bashrc?) into your .bash_profile and then logging out and in again or restarting. I'm guessing it's in your bashrc which doesn't run in non-interactive sessions like in tasks."

How to uninstall VS code completely from manjaro linux, when terminal doesn't see it at all?

I am very new here, and also in programming.
I have found out that I have VS Code two times installed with different ways. When I started it from the KDE it ran well, but when I have started it from the current directory with "code ." it was an oss version without some extension and accounts.
Now I want to uninstall completely both of them. One version I could from terminal with yay --remove code. So the terminal can't see any versoion of vs code any more. But in the application launcher is vs code still there, I can run it and use completely. But I have no idea how to uninstall it.
I have already tried this: https://code.visualstudio.com/docs/setup/uninstall
you can uninstall from manjaro linux by visiting the add software>installed>code and clicking the trashcan near the name of the software. this will queue the action of deletion. Now just click apply on the bottom right of the screen and confirm all the things it will ask you. then it will uninstall code.
So I also had this problem, I found this command for uninstall vs code,
sudo pacman -R visual-studio-code-bin

Can't open VSCode from command-line WSL ZSH

So I decided to quit dual-boot and start using WSL. I'm having a problem and really can figure out how to fix it.
I simply can't open VSCode using the code command from the terminal when using an external terminal. When using the integrated, a command like "code ." works just fine.
Anyone knows how to fix it? It was working good a few steps of setup ago, but I lost track and don't exactly when that happened. I'm currently using HyperJS as terminal and my integrated terminal is already running zsh and it works when the VSCode is connected to WSL and when it isn't aswell.
Anyway, hoping for a fix, 'cause I'm really lost.
Thanks!
It's fixed and it was an easy fix, but it took long for me to realize that all I had to do was one step.
Here's the thing: the command "code" on the integrated terminal was working like a charm because the VSCode itself was running as administrator on Windows.
My Hyper wasn't running as administrator, so all I did was:
Right-click on HyperJS icon and go to the properties of the application
Switch to "Compatibility" tab
Check the "Run as administrator"
It's working without a problem now. Took me a while to realize that, but it's all good now.

vscode is not working properly after introduction of remote WSL feature

If I disable or uninstall Remote WSL plugin on VScode cursor starts jumping from one place to another. what should i do to avoid this from happening. I don't want to use the plugin.
I have installed WSL so VScode always prompts to install the plugin.
I had multiple code formatter that's why this was happening. remote WSL has nothing to with this problem. sorry for wrong question.