Support running remotely for VS Code Remote Development
mjbvz opened this issue · 1 comments
Hi, I'm on the VS Code team. We recently released support for Remote Development and I believe that your extension may not work properly when run in a remote workspace
Problem
To make remote development as transparent as possible to users, VS Code distinguishes two classes of extensions:
-
UI Extensions: These extensions make contributions to the VS Code user interface and are always run on the user's local machine. UI Extensions cannot directly access files in the workspace, or run scripts/tools installed in that workspace or on the machine. Example UI Extensions include: themes, snippets, language grammars, and keymaps.
-
Workspace Extensions: These extensions are run on the same machine as where the workspace is located. When in a local workspace, Workspace Extensions are run on the local machine. When in a remote workspace, Workspace Extensions are run on the remote machine. Workspace Extensions can access files in the workspace to provide rich, multi-file language services, debugger support, or perform complex operations on multiple files in workspace (either themselves or by invoking scripts/tools).
You can find more details about this architecture here.
Your extension is currently running as workspace extension. This means that the server it starts will be run on the remote machine, which in turn means that webview will not be able to access it using localhost
since the webview is running on the user's local machine:
Potential Fix
We've introduced a new webview port mapping API that should make it possible for your extension to run remotely with fairly minor modifications.
Please let me know if you have any questions about the issue or the new api. We've also put together a guide to help you test your extension in remote workspaces
I can confirm that the extension is not working using SSH Remote Development.