How to Use VS Code Remote Development
· Category: VS Code & Developer Tools
Short answer
VS Code Remote Development lets you edit code on remote machines, inside containers, or in WSL as if it were local. The UI runs locally while extensions and tools run remotely.
Steps
- Install the Remote Development extension pack from Microsoft.
- Click the remote indicator in the bottom-left and select your target: SSH, Container, or WSL.
- For SSH, configure
~/.ssh/configwith host details. - Open a folder on the remote; VS Code installs its server automatically.
- Use the terminal and debugger as you would locally.
Tips
- Remote extensions run on the host, so install language servers there.
- Forward ports from the remote to your local machine for testing web apps.
- Use Dev Containers to define a reproducible environment in
.devcontainer.
Common issues
- Slow connections cause lag; enable compression in SSH config.
- Firewall rules may block the VS Code server port on remote hosts.