Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions docs/remote/wsl.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,31 @@ You can also use the `code` command line from this same terminal window to perfo

![Using the code CLI](images/wsl/code-command-in-terminal.png)

### Using WSL over an existing SSH connection

Starting with VS Code 1.89, it is possible to connect to a WSL distribution over an existing SSH connection.

This workflow is useful when you are already connected to a remote machine using **Remote - SSH** and want to work inside a WSL environment hosted on that machine.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop this line for conciseness


#### Prerequisites
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop the prereqs section


- VS Code 1.89 or later
- Remote - SSH extension
- WSL installed and configured on the remote machine

#### Connect to WSL over SSH
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this heading to keep everything under the main H3 heading


1. Connect to the remote machine using **Remote - SSH**.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Connect to the remote machine using **Remote - SSH**.
1. Connect to the remote machine using the [Remote - SSH extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh).

2. Open the Command Palette (`kbstyle(F1)`) and run:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
2. Open the Command Palette (`kbstyle(F1)`) and run:
2. Run the **WSL: Connect to WSL using Distro** command from the Command Palette (`kb(workbench.action.showCommands)`).


**Remote-WSL: Connect to WSL using SSH**
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**Remote-WSL: Connect to WSL using SSH**


3. Select the target WSL distribution.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, select the remote WSL in the Remote Explorer view.

VS Code will open a new window connected to the selected WSL environment over the existing SSH session.

This setup combines **Remote - SSH** and **Remote - WSL**, enabling a seamless development experience with Linux tooling inside WSL while working on a remote host.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop this line

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review I’ll apply the requested changes and update the PR accordingly.


## Debugging in WSL

Once you've opened a folder in WSL, you can use VS Code's debugger in the same way you would when running the application locally. For example, if you select a launch configuration in `launch.json` and start debugging (`kb(workbench.action.debug.start)`), the application will start on remote host and attach the debugger to it.
Expand Down