-
Notifications
You must be signed in to change notification settings - Fork 5.6k
docs(remote): document using WSL over SSH #9203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -121,6 +121,31 @@ You can also use the `code` command line from this same terminal window to perfo | |||||
|
|
||||||
|  | ||||||
|
|
||||||
| ### 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. | ||||||
|
|
||||||
| #### Prerequisites | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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**. | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| 2. Open the Command Palette (`kbstyle(F1)`) and run: | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| **Remote-WSL: Connect to WSL using SSH** | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| 3. Select the target WSL distribution. | ||||||
|
|
||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||
| 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. | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Drop this line
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. | ||||||
|
|
||||||
There was a problem hiding this comment.
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