# VSCode (editor) 📝

Open source (Micro$oft) atlernative to sublimet-text. - VSCode / r/vscode

Frankly I find it complete nonsense to be using an editor in a web browser on an interpreted language, but you know what? People said the same of emacs in the ’80s and ’90s
 - Making Emacs popular again

VS Code - What’s the deal with the telemetry? / HN

VSCode’s SSH agent is bananas - Unlike Tramp, which lives off the land on the remote connection, VSCode mounts a full-scale invasion: it runs a Bash snippet stager that downloads an agent, including a binary installation of Node.

# ☠ powning VSCode ☠

That’s the reason you have to trust the repo => remove .vscode folder

Stealth measures layered on top

  • .vscode/settings.json:7 — “**/.vscode”: true in files.exclude hides .vscode/ from VS Code’s own file explorer. Victim never sees tasks.json while browsing the project.
  • .vscode/tasks.json — fake “Welcome to Node.js v24.11.0” REPL banner as decoy output.
  • AUTH_API in .env is base64-encoded to evade casual string search; the real attacker URL is also hardcoded inline in socket/index.js:73 for redundancy.
  • server.js:39-45 — process.on(‘uncaughtException’) and unhandledRejection silently swallow all errors.
  • async without await neutralizes the nominal “verification” guard.

# VSCodium âźș

Project exists so that you don’t have to download+build from source. This project includes special build scripts that clone Microsoft’s vscode repo, run the build commands, and upload the resulting binaries for you to GitHub releases. These binaries are licensed under the MIT license.

Install as .deb so update are managed by your system. congifure depot

$ sudo apt update && sudo apt install codium

Share vscode extension

$ codium --extensions-dir ~/.vscode/extensions

# Code-Server âźș

Run VS Code on any machine anywhere and access it in the browser.

Note: this is not the same thing as Visual Studio Code Server, which has some licensing restriction like “hosting it as a service is not allowed”

Some restriction apply:

  • note alls extension are working
    • Cline does not work => use the cli instead.

# Nix/apt

This allows seamless integration with host: it share direct filesystem and tools in terminal like ninja/gcc, no need to customize the docker image.

$ nix profile add nixpkgs#code-server  # Maybe old

# pick latest on github https://github.com/coder/code-server/releases
$ wget https://github.com/coder/code-server/releases/download/vX.X.X/code-server_X.X.X_amd64.deb
$ sudo apt install ./code-server_X.X.X_amd64.deb

$ code-server \ # default to 127.0.0.1:8080
  --extensions-dir /home/yves/.vscode/extensions
Running it as a systemd service
# /etc/systemd/system/code-server.service
[Unit]
Description=code-server
After=network.target

[Service]
Type=simple
User=yves
ExecStart=/usr/bin/code-server \ # default to 127.0.0.1:8080
  --extensions-dir /home/yves/.vscode/extensions 
  
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target

To activate

$ sudo systemctl enable code-server
$ sudo systemctl start code-server

# 
$ journalctl -u code-server -f

# Podman

Usuall pod restrictions apply


$ podman pull ghcr.io/coder/code-server:latest

# start server with local socket only
$ podman run -d \
  --replace \
  --name code-server \
  -v ~/DEV:/home/coder/project \
  -p 127.0.0.1:8080:8080 \
  -e PASSWORD="yourpassword" \
  ghcr.io/coder/code-server:latest 

# SSH tunnel

This is the simplest way to securize access (auth+encryption)

# create ssh tunnel client <-> codeserver
$ ssh -N -L 8080:127.0.0.1:8080 yves-lab

# open browser on client at http://localhost:8080

see also

# Feature

★ : extension exist both in codium registry and vscode registry

# Customization

Synchronising Settings

# Useful extensions

# Code Annotation âźș

# Others

# Markdown

# Dev

# Code Runner âźș

Runs selected code snippets per click or keyboard shortcut.

  • if cusomizing command make sure they are compatible with your current shell
  • by default has its own telemetry on

Settings - make sure to enable these

  • save all files before running
  • Run In Terminal
  • Clear Previous Output
  • File Directory As Cwd - may/not be depending on your use

# C++ âźș

  • clangd - Provides C/C++ language IDE features for VS Code using clangd:
    • code completion
    • compile errors and warnings
    • go-to-definition and cross references
    • include management
    • code formatting
    • simple refactorings
  • C++ TestMate - run unit Test inside VSCode
  • Disassembly Explorer - an alternative to Compiler explorer

# Crystal âźș

# Python âźș

# shader

# Tips & Tricks âźș

# Remote

Run inside chrome and work over ssh.

If you have Chrome installed, it opens the browser in app mode. That means there’s no keybind conflicts, address bar, or indication that you’re coding within a browser. It feels just like native VS Code.

prefer coder/code-server

Otherwise continue below

# VS Code Remote âźș

  • work over ssh
  • on container
  • on WSL (windows)

does not work with fish as default user shell => will cause a Timeout on VSCode client (though ssh work perfectly).

# Run over ssh âźș

By default, sshcode will rsync your local VS Code settings and extensions to the remote server every time you connect.

#You can specify a remote directory as the second argument
go/bin/sshcode kyle@dev.kwc.io ~/projects/sourcegraph

# Autocolor by Host âźș

Using Peacock - it must be installed on both local and remote server (?). - doc

# Troubleshooting

  • Github copilot extension - is doing rigrep => this can saturate cpu when opening home folder in remote. => disabling copilot extension solve it

# Install

# Theia âźș

Runs VS Code Extensions

Written on August 12, 2018, Last update on April 30, 2026
vscode security remote editor ssh microsoft mouseless profile