Visual Studio Code supports special vscode:// deep links that let you open specific files directly from a web page, email, document, or even another app.
This is especially handy if you work with Remote – Containers, WSL, or other remote development setups, because you can create links that jump straight to files inside those environments.
1. The Basic Local Format
For files on your local machine, the format is simple:
vscode://file/<absolute-path>
Example:
vscode://file/C:/Projects/app/index.js
Or on macOS/Linux:
vscode://file//home/dan/projects/app/index.js
Note: The double slash after file: is needed for Unix-style paths.
2. Linking to Files in WSL
When using Windows Subsystem for Linux, the remote-kind is wsl:
vscode://vscode-remote/wsl+<distro-name>/<absolute-path>
Example:
vscode://vscode-remote/wsl+Ubuntu-22.04/home/dan/project/app.js
How to find your distro name:
wsl -l -q
3. Linking to Files in a Remote Docker Container
When connected to a dev container, the remote-kind is dev-container (or attached-container if you attached to an existing one).
Format:
vscode://vscode-remote/dev-container+<identifier>/<absolute-path>
Example:
vscode://vscode-remote/dev-container+myproject//workspace/app/src/index.js
Notes:
<identifier>is usually the folder name from.devcontainer/devcontainer.jsonor the container name.- Use
//before the workspace path to preserve the leading/from inside the container. - To find the exact identifier, open the Command Palette inside VS Code and run:
Remote-Containers: Show LogLook for the string afterdev-container+.
4. Special Case – Docker Inside WSL
If you’re running Docker inside WSL and open VS Code in a container from there, the format becomes nested:
vscode://vscode-remote/dev-container+<container-identifier>/home/dan/project/app.js
But the <container-identifier> may itself reference WSL internally — in practice, VS Code handles this automatically as long as you copy the URI from the Command Palette (Copy Path as vscode:// URI).
Summary Table
| Environment | URI Format |
|---|---|
| Local | vscode://file/<absolute-path> |
| WSL | vscode://vscode-remote/wsl+<distro>/<absolute-path> |
| Dev Container | vscode://vscode-remote/dev-container+<identifier>/<absolute-path> |
| Attached Container | vscode://vscode-remote/attached-container+<identifier>/<absolute-path> |
With these formats, you can make clickable links in documentation, tickets, or web apps that take you straight to the right file in VS Code — whether it’s local, in WSL, or inside a Docker container.

