Skip to content

Commit 4f78f22

Browse files
committed
2 parents e2ef2d8 + 137d26d commit 4f78f22

File tree

7 files changed

+31
-28
lines changed

7 files changed

+31
-28
lines changed

api/advanced-topics/remote-extensions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
ContentId: 5c708951-e566-42db-9d97-e9715d95cdd1
3-
DateApproved: 3/22/2019
3+
DateApproved: 5/2/2019
44

55
# Summarize the whole topic in less than 300 characters for SEO purpose
66
MetaDescription: A guide to adding Visual Studio Code Remote Development support to extensions
@@ -73,7 +73,7 @@ You can edit and debug your extension in a container by following these steps.
7373

7474
4. Run **Remote-Containers: Reopen Folder in Container** and in a moment, VS Code will set up the container and connect. You can now edit your source code as you would in the local case.
7575

76-
5. Finally, press `kbstyle(F5)` or use the **Debug view** to launch the extension and attach the debugger as you would locally. The window that appears will now contain your extension running inside this same container with the debugger attached to it.
76+
5. Finally, press `kbstyle(F5)` or use the **Debug view** to launch the extension and attach the debugger as you would locally. The window that appears now contains your extension running inside this same container with the debugger attached to it.
7777

7878
#### Using SSH or WSL
7979

@@ -83,7 +83,7 @@ You can edit and debug your extension on a remote [SSH host](/docs/remote/ssh) o
8383

8484
2. Once the folder is open on the SSH host / in WSL, you can edit your source code as you would in the local case.
8585

86-
3. Finally, press `kbstyle(F5)` or use the **Debug view** to launch the extension and attach the debugger as you would locally. The window that appears will now contain your extension running on the SSH Host / in WSL with the debugger attached to it.
86+
3. Finally, press `kbstyle(F5)` or use the **Debug view** to launch the extension and attach the debugger as you would locally. The window that appears now contains your extension running on the SSH Host / in WSL with the debugger attached to it.
8787

8888
## Common problems
8989

@@ -263,7 +263,7 @@ export async function activate(context: vscode.ExtensionContext) {
263263

264264
### Communicating between extensions using commands
265265

266-
Some extensions return APIs as a part of their activation function that are intended for other extensions to use (via `vscode.extension.getExtension(extensionName).exports`). While these will work if all extensions involved are on the same side (either all UI Extensions or all Workspace Extensions), these will not work between UI and Workspace Extensions.
266+
Some extensions return APIs as a part of their activation that are intended for other extensions to use (via `vscode.extension.getExtension(extensionName).exports`). While these will work if all extensions involved are on the same side (either all UI Extensions or all Workspace Extensions), these will not work between UI and Workspace Extensions.
267267

268268
Fortunately, VS Code automatically routes any executed commands to the correct extension regardless of its location. You can freely invoke any command (including those provided by other extensions) without worrying about impacts.
269269

docs/remote/containers.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ TOCTitle: Containers
55
PageTitle: Developing inside a Container using Visual Studio Code Remote Development
66
ContentId: 7ec8a02b-2eb7-45c1-bb16-ddeaac694ff6
77
MetaDescription: Developing inside a Container using Visual Studio Code Remote Development
8-
DateApproved: 4/11/2019
8+
DateApproved: 5/2/2019
99
---
1010
# Developing inside a Container
1111

@@ -115,17 +115,17 @@ The [vscode-dev-containers repository](https://aka.ms/vscode-dev-containers) has
115115

116116
### Configuration edit loop
117117

118-
Editing your container configuration is easy. Since rebuilding a container will "reset" the container to its starting contents (with the exception of your local source code), VS Code does not automatically rebuild if you edit a container configuration file (`devcontainer.json`, `Dockerfile`, `docker-compose.yml`). Instead, there are some commands that can be used to make editing your config easier.
118+
Editing your container configuration is easy. Since rebuilding a container will "reset" the container to its starting contents (with the exception of your local source code), VS Code does not automatically rebuild if you edit a container configuration file (`devcontainer.json`, `Dockerfile`, `docker-compose.yml`). Instead, there are some commands that can be used to make editing your configuration easier.
119119

120120
Here is the typical edit loop using these commands:
121121

122122
1. Start with `kbstyle(F1)` > **Remote-Containers: Create Container Configuration File...**
123123
2. Edit the contents of the `.devcontainer` folder as required.
124-
3. Try it with `kbstyle(F1)` > **Remote-Containers: Reopen folder in Container**.
124+
3. Try it with `kbstyle(F1)` > **Remote-Containers: Reopen Folder in Container**.
125125
4. On failure:
126126
1. `kbstyle(F1)` > **Remote-Containers: Reopen Folder Locally** which will open a new local window.
127127
2. In this local window: Edit the contents of the `.devcontainer` folder as required.
128-
3. Try it again: Go back to the container window, `kbstyle(F1)` > **Remote-Containers: Reload Window**.
128+
3. Try it again: Go back to the container window, `kbstyle(F1)` > **Developer: Reload Window**.
129129
4. Repeat as needed.
130130
5. If the build was successful, but you want to make more changes:
131131
1. Edit the contents of the `.devcontainer` folder as required when connected to the container.

docs/remote/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ TOCTitle: FAQ
55
PageTitle: Visual Studio Code Remote Development Frequently Asked Questions
66
ContentId: 66bc3337-5fe1-4dac-bde1-a9302ff4c0cb
77
MetaDescription: Visual Studio Code Remote Development Frequently Asked Questions (FAQ) for SSH, Containers, and WSL
8-
DateApproved: 4/11/2019
8+
DateApproved: 5/2/2019
99
---
1010
# Remote Development FAQ
1111

docs/remote/remote-overview.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ TOCTitle: Overview
55
PageTitle: Visual Studio Code Remote Development
66
ContentId: eceea3f0-feee-47c2-8b65-1f1b0825355b
77
MetaDescription: Visual Studio Code Remote Development
8-
DateApproved: 1/30/2019
8+
DateApproved: 5/2/2019
99
---
1010
# VS Code Remote Development
1111

12-
VS Code Remote Development allows you to use a container, remote machine, or the [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/windows/wsl) as a full-featured development environment. You can:
12+
Visual Studio Code Remote Development allows you to use a container, remote machine, or the [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/windows/wsl) as a full-featured development environment. You can:
1313

1414
- Develop on the **same operating system** you deploy to or use **larger or more specialized** hardware.
1515
- **Sandbox** your development environment to avoid impacting your local **machine configuration**.
@@ -37,6 +37,6 @@ While most VS Code extensions should work unmodified in a remote environment, ex
3737

3838
## Questions or feedback
3939

40-
- See [Tips and Tricks](https://aka.ms/vscode-remote/troubleshooting) or the [FAQ](/docs/remote/faq).
40+
- See [Tips and Tricks](/docs/remote/troubleshooting.md) or the [FAQ](/docs/remote/faq.md).
4141
- Search on [Stack Overflow](https://stackoverflow.com/questions/tagged/vscode).
4242
- Add a [feature request](https://aka.ms/vscode-remote/feature-requests) or [report a problem](https://aka.ms/vscode-remote/issues/new).

docs/remote/ssh.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ TOCTitle: SSH
55
PageTitle: Developing on Remote Machines using SSH and Visual Studio Code
66
ContentId: 42e65445-fb3b-4561-8730-bbd19769a160
77
MetaDescription: Developing on Remote Machines or VMs using Visual Studio Code Remote Development and SSH
8-
DateApproved: 4/11/2019
8+
DateApproved: 5/2/2019
99
---
1010
# Remote Development using SSH
1111

1212
The **Visual Studio Code Remote - SSH** extension allows you to open a remote folder on any remote machine, virtual machine, or container with a running SSH server and take full advantage of VS Code's feature set. Once connected to a server, you can interact with files and folders anywhere on the remote filesystem.
1313

14-
Given **no source code needs to be on your local machine**, this approach provides dramatic performance and fidelity benefits over using network shares or synchronizing files.
14+
No source code needs to be on your local machine to gain these benefits since the extension runs commands and other extensions directly on the remote machine.
1515

1616
![SSH Architecture](images/ssh/architecture-ssh.png)
1717

18-
The result is that VS Code can provide a **local-quality development experience** including full IntelliSense (completions), code navigation, and debugging, **regardless of where your code is hosted**.
18+
This lets VS Code provide a **local-quality development experience** including full IntelliSense (completions), code navigation, and debugging **regardless of where your code is hosted**.
1919

2020
## Getting started
2121

@@ -25,7 +25,7 @@ To get started you need to:
2525

2626
1. Install an [OpenSSH compatible SSH client](/docs/remote/troubleshooting.md#installing-a-supported-ssh-client) if one is not already present.
2727

28-
> **Note:** PuTTY is not supported on Windows since a `ssh` command must be in the path.
28+
> **Note:** PuTTY is not supported on Windows since the `ssh` command must be in the path.
2929
3030
2. Install [Visual Studio Code Insiders](https://code.visualstudio.com/insiders/).
3131

docs/remote/troubleshooting.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ TOCTitle: Tips and Tricks
55
PageTitle: Visual Studio Code Remote Development Troubleshooting Tips and Tricks
66
ContentId: 42e65445-fb3b-4561-8730-bbd19769a160
77
MetaDescription: Visual Studio Code Remote Development troubleshooting tips and tricks for SSH, Containers, and the Windows Subsystem for Linux (WSL)
8-
DateApproved: 4/11/2019
8+
DateApproved: 5/2/2019
99
---
1010
# Remote Development Tips and Tricks
1111

@@ -547,18 +547,19 @@ Optionally, you can add the following contents to a `.gitattributes` file to for
547547

548548
## Extension tips
549549

550-
While many extensions will work unmodified, there are a few issues that can prevent certain features from working as expected. These issues can typically be resolved by adopting a VS Code API. This section provides a quick reference for common issues and tips on resolving them. You can also refer to the main extension article on [Supporting Remote Development](/api/advanced-topics/remote-extensions) for an in-depth guide.
550+
While many extensions will work unmodified, there are a few issues that can prevent certain features from working as expected. In some cases you can use another command to work around the issue, while in others the extension may need to be modified. This section provides a quick reference for common issues and tips on resolving them. You can also refer to the main extension article on [Supporting Remote Development](/api/advanced-topics/remote-extensions) for an in-depth guide on modifying extensions when required.
551551

552552
| Problem | Description | Resolution |
553553
|---------|-------------|------------|
554-
| **Browser does not open locally** | Some extensions use external node modules or custom code to launch a browser window. Unfortunately, this may cause the extension to launch the browser remotely instead of locally. | The `vscode.env.openExternal` API will open a local browser to resolve this problem. See the [extension guide](/api/advanced-topics/remote-extensions#opening-something-in-a-local-browser-or-application) for details. |
555-
| **Clipboard does not work** | Some extensions use node modules like `clipboardy` to integrate with the clipboard. Unfortunately, this may cause the extension to incorrectly integrate with the clipboard on the remote side. | Use the VS Code clipboard API. See [here for details](/api/advanced-topics/remote-extensions#using-the-clipboard). |
556-
| **Cannot access local web server from browser or application** | When working inside a container or SSH host, the port the browser is connecting to may be blocked. | The `vscode.env.openExternal` API will automatically forward localhost ports to resolve this problem. See the [extension guide](/api/advanced-topics/remote-extensions#opening-something-in-a-local-browser-or-application) for details. |
557-
| **WebView contents do not appear** | If your WebView content uses an iframe to connect to a local web server, the port the WebView is connecting to may be blocked. | The WebView API now includes a `portMapping` property that you can use to solve this problem. See [here for details](/api/advanced-topics/remote-extensions#accessing-localhost). |
554+
| **Local absolute path settings fail when applied remotely** | VS Code's local user settings are reused when you connect to a remote endpoint. While this keeps your user experience consistent, you may need to vary absolute path settings between your local machine and each host / container / WSL since the target locations are different. | You can set endpoint specific settings after you connect to a a remote endpoint by running the **Preferences: Open Remote Settings** command from the Command Palette (`kbstyle(F1)`) or by clicking on the "Remote" tab in the settings editor. These settings will override any local settings you have in place whenever you connect.|
555+
| **Browser does not open locally** | Some extensions use external node modules or custom code to launch a browser window. Unfortunately, this may cause the extension to launch the browser remotely instead of locally. | The extension can switch to using the `vscode.env.openExternal` API to resolve this problem. See the [extension guide](/api/advanced-topics/remote-extensions#opening-something-in-a-local-browser-or-application) for details. |
556+
| **Clipboard does not work** | Some extensions use node modules like `clipboardy` to integrate with the clipboard. Unfortunately, this may cause the extension to incorrectly integrate with the clipboard on the remote side. | The extension can switch to the VS Code clipboard API to resolve the problem. See the [extension guide](/api/advanced-topics/remote-extensions#using-the-clipboard) for details. |
557+
| **Cannot access local web server from browser or application** | When working inside a container or SSH host, the port the browser is connecting to may be blocked. | The extension can switch to the `vscode.env.openExternal` API (which automatically forwards localhost ports) to resolve this problem. See the [extension guide](/api/advanced-topics/remote-extensions#opening-something-in-a-local-browser-or-application) for details. |
558+
| **WebView contents do not appear** | If the extension's WebView content uses an iframe to connect to a local web server, the port the WebView is connecting to may be blocked. | The WebView API now includes a `portMapping` property that the extension can use to solve this problem. See the [extension guide](/api/advanced-topics/remote-extensions#accessing-localhost) for details. |
558559
| **Blocked localhost ports** | If you are trying to connect to a localhost port from an external application, the port may be blocked. | There currently is no API for extensions to programmatically forward arbitrary ports, but you can use the **Remote-Containers: Forward Port from Container...** or **Remote-SSH: Forward Port from Active Host...** to do so manually. |
559-
| **Errors storing extension data** | Extensions may try to persist global data by looking for the `~/.config/Code` folder on Linux. This folder may not exist, which can cause the extension to throw errors like `ENOENT: no such file or directory, open '/root/.config/Code/User/fileame-goes-here`. | Use the `context.globalStoragePath` or `context.storagePath` property instead. See the[extension guide](/api/advanced-topics/remote-extensions#persisting-extension-data-or-state) for details. |
560-
| **Cannot sign in / have to sign in each time I connect to a new endpoint** | Extensions with a sign in may persist secrets using their own code. This code can fail due to missing dependencies. Even if it succeeds, the secrets will be stored remotely, which means you have to sign in for every new endpoint. | Use the `keytar` node module. See the [extension guide](/api/advanced-topics/remote-extensions#persisting-secrets) for details. |
561-
| **Extensions that ship or acquire pre-built native modules fail** | Native modules bundled with (or dynamically acquired for) a VS Code extension must be recompiled [using Electron's `electron-rebuild`](https://electronjs.org/docs/tutorial/using-native-node-modules). However, VS Code Server runs a standard (non-Electron) version of Node.js which can cause binaries to fail when used remotely. | First, include (or dynamically acquire) both sets of binaries (Electron and standard Node.js) for the "modules" version in Node.js that VS Code ships. Next, check to see if `context.executionContext === vscode.ExtensionExecutionContext.Remote` in your activation function to set up the correct binaries based on whether the extension is running remotely or locally. See the [extension guide](/api/advanced-topics/remote-extensions#using-native-node.js-modules) for details. |
560+
| **Errors storing extension data** | Extensions may try to persist global data by looking for the `~/.config/Code` folder on Linux. This folder may not exist, which can cause the extension to throw errors like `ENOENT: no such file or directory, open '/root/.config/Code/User/fileame-goes-here`. | Extensions can use the `context.globalStoragePath` or `context.storagePath` property to resolve this problem. See the [extension guide](/api/advanced-topics/remote-extensions#persisting-extension-data-or-state) for details. |
561+
| **Cannot sign in / have to sign in each time I connect to a new endpoint** | Extensions with a sign in may persist secrets using their own code. This code can fail due to missing dependencies. Even if it succeeds, the secrets will be stored remotely, which means you have to sign in for every new endpoint. | Extensions can use the `keytar` node module to solve this problem. See the [extension guide](/api/advanced-topics/remote-extensions#persisting-secrets) for details. |
562+
| **Extensions that ship or acquire pre-built native modules fail** | Native modules bundled with (or dynamically acquired for) a VS Code extension must be recompiled [using Electron's `electron-rebuild`](https://electronjs.org/docs/tutorial/using-native-node-modules). However, VS Code Server runs a standard (non-Electron) version of Node.js which can cause binaries to fail when used remotely. | Extensions need to be modified to solve this problem. The will need to include (or dynamically acquire) both sets of binaries (Electron and standard Node.js) for the "modules" version in Node.js that VS Code ships and then check to see if `context.executionContext === vscode.ExtensionExecutionContext.Remote` in their activation function to set up the correct binaries. See the [extension guide](/api/advanced-topics/remote-extensions#using-native-node.js-modules) for details. |
562563
| **Cannot access / transfer remote workspace files to local machines** | Extensions that open workspace files in external applications may encounter errors because the external application cannot directly access the remote files. | We are investigating options for how extensions might be able to transfer files from the remote workspace to solve this problem. |
563564
| **Cannot access attached device from extension** | Extensions that access locally attached devices will be unable to connect to them when running remotely. | We are investigating the best approach to solve this problem. |
564565

0 commit comments

Comments
 (0)