Skip to content

Installing Visual Studio Code

Installing package VsCode via curl

Get curl

Bash
$ su -
# apt-get install curl

Installing

The proprietary repository and key can also be installed manually with the following script:

Bash
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/keyrings/microsoft-archive-keyring.gpg
sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/microsoft-archive-keyring.gpg] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'

Note

root@debiandesktop:~# curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 983 100 983 0 0 18848 0 --:--:-- --:--:-- --:--:-- 19274
root@debiandesktop:~# sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/keyrings/microsoft-archive-keyring.gpg
root@debiandesktop:~# sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/microsoft-archive-keyring.gpg] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/ vscode.list'

Then update the package cache and install the package using:

Bash
sudo apt-get update
sudo apt-get install code # or code-insiders

Custom vsCode

.vscode.setting.json
{
    "ansible.python.interpreterPath": "/usr/bin/python",
    "files.insertFinalNewline": true,
    "files.trimFinalNewlines": true,
    "files.trimTrailingWhitespace": true,
    "editor.renderFinalNewline": "on",
    "editor.semanticHighlighting.enabled": true,
    "ansible.ansible.path": "usr/bin/ansible",
    "ansible.ansible.useFullyQualifiedCollectionNames": true,
    "ansible.validation.lint.enabled": true,
    "ansible.validation.lint.path": "/usr/bin/ansible-lint"
}