Free — no signup required

The VS Code Architecture: Why It Can Do All This

2 min read

Client-Server by Design

Before diving into specific features, it helps to understand why VS Code can do things that simpler editors cannot. The architecture explains everything.

VS Code is split into two distinct layers:

  • The UI layer (client): The window you see on your screen. It renders the file tree, the editor tabs, the status bar, and the panels. This runs on your local machine.
  • The Language Server layer (server): A separate process that does the heavy lifting — parsing your code, running linters, providing autocomplete suggestions, and executing the debugger. This can run anywhere.

This separation is called the Language Server Protocol (LSP), an open standard originally developed by Microsoft. When you install a Python extension, it installs a Python Language Server that speaks LSP. VS Code's UI talks to that server to get autocomplete suggestions, error highlights, and "go to definition" results. The UI doesn't need to know anything about Python — it just renders what the server tells it.

The practical consequence: the server can run on a remote machine. VS Code's Remote Development extensions exploit this directly. Your UI stays on your laptop; the language server runs on the remote host, using that host's CPU, libraries, and filesystem. This is why remote editing feels identical to local editing.

Your Laptop                          Remote Host (EC2 / Container)
┌─────────────────────┐              ┌──────────────────────────────┐
│  VS Code UI         │◄────SSH─────►│  VS Code Server              │
│  (renders editor)   │              │  (runs extensions, debugger) │
│                     │              │  (accesses remote filesystem) │
└─────────────────────┘              └──────────────────────────────┘

Understanding this architecture also explains a common gotcha: extensions installed locally do not automatically run in remote sessions. When you connect to a remote host or container, VS Code installs a fresh server there, and you must install extensions on that server. VS Code handles this automatically when you click "Install in SSH: hostname" or "Install in Container," but it is worth knowing why the distinction exists.

This is one of 18 chapters

Every chapter is free — Kubernetes, Terraform, SRE, distributed systems, and more — with fast daily review built in.

Sign up free