Completely uninstall VS Code extensions in WSL - visual-studio-code

I cannot uninstall a certain VS Code extension (CodeLLDB) that is installed in my WSL. If I try with the VS Code GUI after reopening the program the extension is still there. If I try with the console the same thing happens.
I tried the following, as some answers here recommended:
$ code --list-extensions
vadimcn.vscode-lldb
That is the extension I want to uninstall, so I run:
$ code --uninstall-extension vadimcn.vscode-lldb --force
Uninstalling vadimcn.vscode-lldb...
Extension 'vadimcn.vscode-lldb' was successfully uninstalled!
But if I list them again it is still there:
$ code --list-extensions
vadimcn.vscode-lldb
Some extra details:
I use WSL 2 with Ubuntu 20.04.

Finally I found that the extensions where installed in my WSL2 in the directory ~/.vscode-server/extensions/ as this answer says, so the way to uninstall it is:
$ cd ~/.vscode-server/extensions/
$ rm -rf <extension-name>

Related

VSCode asdf-vm command no such file or directory

Specs
VSCode 1.63.2
Homebrew 3.3.10
asdf 0.9.0
MacOS Monterey
Problem
I installed asdf via Homebrew as per doc http://asdf-vm.com/guide/getting-started.html#_3-install-asdf
The asdf command works well in my iTerm. However, it didn't work when committing or pushing via VScode terminal and VSCode source control.
The error from VSCode terminal
Unknown command: `asdf exec npm run pre-commit`
/usr/local/Cellar/asdf/0.9.0/libexec/bin/asdf: line 82: /usr/local/opt/asdf/lib/commands/command-help.bash: No such file or directory
And this below from VSCode source control
The error I got in output.
> git push origin feature/my-branch
Unknown command: `asdf exec npm run pre-commit`
/usr/local/Cellar/asdf/0.9.0/libexec/bin/asdf: line 82: /usr/local/opt/asdf/lib/commands/command-help.bash: No such file or directory
Running asdf exec npm run pre-commit in my iTerm works well. There must be different configuration between zsh in iTerm vs in VSCode. 🤔
My attempt so far is to add this configuration in VSCode settings.json
"terminal.external.osxExec": "iTerm.app",
"terminal.integrated.defaultProfile.osx": "zsh"
but still not working
My ~/.zshrc setup for asdf
. /usr/local/opt/asdf/libexec/asdf.sh
What is the possible cause here?
Found dubious decision
I also dont have commands folder in asdf/lib
So I copied the same from asdf/libexec/lib
And it worked

How to open Visual Studio Code from the command line on RHEL?

I would like to open VSCode from my RHEL terminal using the code command but when I try to type Shell Command: Install 'code' command in PATH directly in VSCode Command Palette, it indicates that No matching command is found. Is there a way to configure $PATH directly via the command line to make code work?
Finally what worked for me was to run the following commands :
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
dnf check-update
sudo dnf install code

libxkbcommon.so.0: no version information available after installing VSCode update

I am using Ubuntu 14.04 LTS. After updating VSCode to v.1.53.0 I am getting following message on opening VSCode:
/usr/share/code/bin/../code: /usr/lib/x86_64-linux-gnu/libxkbcommon.so.0: no version information available (required by /usr/share/code/bin/../code)
On giving command code --verbose I get following logs: logs
I cannot update current Ubuntu version due to limited admin rights.
If you run code --verbose you will see real problem:
[main 2021-04-16T11:44:45.671Z] Main->SharedProcess#connect
/usr/share/code/code --verbose --no-sandbox: relocation error: /usr/share/code/resources/app/node_modules.asar.unpacked/spdlog/build/Release/spdlog.node: symbol _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference
It can't find symbol basic_string::compare
echo _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc | demangle
So to run visual studio code on Ubuntu 14.04 LTS
You just need to copy libstdc++.so.6.0.28 and libstdc++.so.6
to /usr/share/code from ubuntu 20.04 LTS
You can get libstdc++.so.6.0.28 (md5=0e7d34a60136c0cd150917ed099980f2) for example from this deb file
Here simple script to do it for you
#!/bin/sh
wget https://mirrors.wikimedia.org/ubuntu/ubuntu/pool/main/g/gcc-10/libstdc%2B%2B6_10.2.0-5ubuntu1~20.04_amd64.deb
dpkg-deb -R libstdc++6_10.2.0-5ubuntu1~20.04_amd64.deb .
sudo cp -P usr/lib/x86_64-linux-gnu/* /usr/share/code/
file version changed in wikimedia.org so new script:
#!/bin/sh
wget https://mirrors.wikimedia.org/ubuntu/ubuntu/pool/main/g/gcc-10/libstdc%2B%2B6_10.3.0-1ubuntu1~20.04_amd64.deb --no-check-certificate
dpkg-deb -R libstdc++6_10.3.0-1ubuntu1~20.04_amd64.deb .
sudo cp -P usr/lib/x86_64-linux-gnu/* /usr/share/code/
md5sum of new libstdc++.so.6.0.28 604ec2999aeb3aadd0e96103fd4b5e5d
Then just type code
ps: very good font for vscode JetBrains Mono
I downgraded my VSCode to lower version. Apparently you can access previous versions of VSCode from it's website but the link's font was too big form me to see.
Still if someone does come across any other alternative please share.
Leaving this here for others.

I don't know how to really enable extension in visual studio code

first of all i wanted to say that i'm real beginner
Some days ago i started using Visual Studio Code, and today i wanted to instal some extensios, every worked perfectly expect one, SmoothType, it's installed but when i read description of it i have to run some commands, there are they
$ cd ~
$ git clone https://github.com/spikespaz-forks/vscode-fix-checksums
$ cd vscode-fix-checksums/
$ npm install
$ npm install -g vsce
$ vsce package
$ code --install-extension vscode-fix-checksums-1.1.0.vsix
but question is where i have to type this commands, and how?
I tried to do it in terminal but this doesn't work
ty for any help first of all

VS Code Jest fails starting on Ubuntu 20.04 (ubuntu-make install)

Environment
Ubuntu 20.04 (official Beta Version)
Visual Studio Code 1.44.2, installed via ubuntu-make (umake):
umake ide visual-studio-code
Node 12 via nvm install 12 && nvm alias default 12 && nvm use default
VS Code Extension: jest
Error
Restarting VS Code fails with:
Finished running all tests. Starting watch mode.
/bin/sh: 1: npm: not found
/bin/sh: 1: npm: not found
Starting Jest in Watch mode failed too many times and has been stopped.
see troubleshooting: https://github.com/jest-community/vscode-jest/blob/master/README.md#troubleshooting
I want to use nvm and want to avoid workaround like adjusting bashrc or similar.
Did not work:
Add to VS Code settings.json (via Ctrl+Shift+P, "Open Settings Json"):
entry "terminal.integrated.shell.linux": "/bin/bash"
Just had an issue running commands over ssh where the node binary from nvm would not be added to the non-login shell's path so couldn't be used. Can't figure out how to add it there and keep it relative to the installed user to be honest.
Removing nvm and installing apt install nodejs through the default repositories is quick workaround if you need.