Skip to content

Implement VS Code remote extensions #1315

Open

Description

@nhooyr
  • Container
  • SSH
  • Tunnels

Related #1032

Activity

  1. lukasmasuch commented on Jan 29, 2020

    @lukasmasuch

    In case this issue is about fixing the remote extensions to work with code-server, this related issue can be closed: #892. I would really like to see the SSH extension to work within code-server and would be happy to test it once there is any fix.

  2. sr229 commented on Jan 29, 2020

    @sr229
    Contributor

    @nhyoor if this interests you, there's a remote subfolder in the main vscode folder, wanna abuse reuse that?

  3. frank-dspeed commented on Feb 1, 2020

    @frank-dspeed

    The remote extension does some checks as far as i know i decompiled it some times.

    There is a validation shema i think we should first automate the decompile process and check that.

  4. nhooyr commented on Feb 2, 2020

    @nhooyr
    ContributorAuthor

    We cannot and will not decompile the extension, that is not valid per the license terms.

  5. Just-Insane commented on Feb 23, 2020

    @Just-Insane

    Is there any further plan to implement these extensions?

  6. kirscheGIT commented on May 29, 2020

    @kirscheGIT

    Is there any further plan to implement these extensions?

    Would also like to know, if you have still have plans to implement this. Thanks!

  7. code-asher commented on May 29, 2020

    @code-asher
    Member

    Nothing concrete at the moment.

  8. gyzerok commented on Jun 5, 2020

    @gyzerok

    I currently have a need for Remote - SSH extension and unfortunately the official one doesn't work for me (which is unlikely to be solved upstream in the near future). So I am considering implementing it myself.

    At least initially I would like to have it as simple as possible. Without any fancy terminal forwarding or something like that. Just make it so that the work with the filesystem and all the language servers are running on the vm and UI is running in the vscode. Similar two what we now have with code-server in the browser, but without browser version problems (such as cmd+w for example).

    Would you have some pointers as to where to start investigating from inside vscode source?

  9. code-asher commented on Jun 8, 2020

    @code-asher
    Member

    At the moment I don't have a good idea of the full scope of what'll be required to make this work but it'll probably have to do with using and/or implementing the remote authority stuff.

    There's a workspace.registerRemoteAuthorityResolver in the proposed API which might be a good starting point.

  10. JayDoubleu commented on Aug 17, 2020

    @JayDoubleu

    building from vscode-1.48.0 branch + adding 9fb33dc , as well as adding ms-vscode-remote.remote-containers to extensionAllowedProposedApi.

    This gets the remote extensions installed however it is still complaining with the error:

    [ms-vscode-remote.remote-containers]: View container 'remote' requires 'enableProposedApi' turned on to be added to 'Remote'.
    

    Tried executing via below.

    code-server --enable-proposed-api ms-vscode-remote.remote-containers
    code-server --enable-proposed-api=ms-vscode-remote.remote-containers
    

    Is there any more direct way to add arguments to the vscode to execute ?
    I'm not sure if the enable-proposed-api switch simply does nothing or there is something else to be enabled.

  11. code-asher commented on Aug 18, 2020

    @code-asher
    Member

    @JayDoubleu could you open a separate issue for the enable proposed API flag? It's possible we have a bug there.

    I'm not confident the remote extensions will work in code-server even if we resolve that though. Unfortunately I won't be able to test since it's against the terms of service to use them in anything other than VS Code. 😢

  12. nhooyr commented on Aug 20, 2020

    @nhooyr
    ContributorAuthor

    See #1779

  13. JayDoubleu commented on Aug 26, 2020

    @JayDoubleu

    Just tested this with ms-vscode-remote.remote-containers-0.132.0.vsix
    When clicking open in container it just disconnects and reloads.
    [server] disconnected from client {"proxies":3}

    I'm assuming there is no way to get ANY remote or codespaces working with code-server ?
    I can see that it's already connecting to localhost as a remote

  14. code-asher commented on Aug 27, 2020

    @code-asher
    Member

    I haven't investigated (I don't think I can since legally we can't run the extension with code-server) so I can't be sure but yeah, I think it's possible that code-server technically being a remote already might be what's causing the incompatibility.

  15. 34 remaining items

  16. vegardhw commented on Jul 9, 2021

    @vegardhw

    This sounds awesome! :) What is the expected timeline for a release...? :)

  17. code-asher commented on Jul 12, 2021

    @code-asher
    Member
  18. geiseri commented on Sep 19, 2021

    @geiseri
    Contributor

    Given the "legal issues" surrounding this I think it would be best to just implement something "compatible" with dev containers. Currently, I run code-server in a docker, so IMHO it would be easier to just have something that will build a docker env from that dev container and run code-server from there. Then the current proxy code used for exposing web development can just forward to that instance. Thus far I have found the remote container development "clunky" at best and running code-server inside of a docker has proven a more usable experience. There is also the issue that code-server should have its own value beyond being a drop-in for MS technology that is easily replaceable. So far code-server can be instigated via ssh, it can run perfectly inside of docker. Just my 2c as someone who uses both remote VS code and code-server.

  19. jsjoeio commented on Sep 20, 2021

    @jsjoeio
    Contributor
  20. jarodium commented on Feb 25, 2022

    @jarodium

    Maybe I am misintepreting the intent of the original issue, but is this issue about to use extensions on a remote location? If so, why not mount a ssh folder on the local/host machine and then run code-server to use that particular folder?

    like this:
    " --extensions-dir="DRIVELETTER:\VSCODE\extensions""
    " --user-data-dir="DRIVELETTER:\VSCODE\settings""

    I have a use case in which I will need this kind of setup. I want to run code-server inside several containers, in which I want a workspace to be available, but I would like to pre-install extensions when I bootup a container.

    I understand that this setup will raise a great number of issues, but for me and my team would be great, since we always use the same extensions to work and has the bonus of adding another person to the team and start him/her up without going through environment setups.

  21. jsjoeio commented on Feb 25, 2022

    @jsjoeio
    Contributor

    I have a use case in which I will need this kind of setup. I want to run code-server inside several containers, in which I want a workspace to be available, but I would like to pre-install extensions when I bootup a container.

    This basically sounds like your own version of Coder! We have many teams who do this. The most common way I've seen is installing the extension as part of the Dockerfile so that it's available when your teammates create a workspace (i.e. access code-server):

    https://coder.com/docs/coder/latest/workspaces/vs-code-extensions#adding-extensions-to-custom-images

  22. spwoodcock commented on Mar 25, 2022

    @spwoodcock

    Though it would be nice to have the official remote extensions working, I can't see it happening anytime soon.

    I have been using code-server for a few years now deployed inside a container (Docker & Kubernetes) & recently got remote debugging working inside Docker containers for a FastAPI app. (sidenote: Docker in Docker is messy. I currently bind mount docker.sock for local development, but I'm sure using a remote TCP host via DOCKER_HOST would work too.)

    For anyone looking at remote debugging, this approach should work for any language that supports a remote debug package (e.g. Python, Node...). I currently use the debugpy package in Python.

    In the root of your repo, add launch.json and tasks.json into the .vscode directory.

    launch.json:

    {
      "configurations": [
        {
          "name": "Python - Remote Attach",
          "type": "python",
          "preLaunchTask": "docker-compose: cycle",
          "request": "attach",
          "host": "NAME_OF_YOUR_DOCKER_CONTAINER",
          "port": 5678,
          "pathMappings": [
            {
              "localRoot": "${workspaceFolder}",
              "remoteRoot": "/opt/app"
            }
          ],
          "justMyCode": false,
        }
      ]
    }

    tasks.json (note: you could use a dockerCompose type task, but this doesn't support V2):

    {
      "version": "2.0.0",
      "tasks": [
        {
          "label": "docker-compose: cycle",
          "type": "shell",
          "command": "docker compose down && docker compose up -d api --no-build",
        }
      ],
    }

    Relevant part of Dockerfile to make this work:

    ...
    ...
    ENTRYPOINT ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
    USER appuser
    
    
    FROM runtime as dev
    RUN pip install debugpy
    ENTRYPOINT ["python", "-m", "debugpy", "--wait-for-client", "--listen", \
                "0.0.0.0:5678", "-m", "uvicorn", "main:app", "--host", \
                "0.0.0.0", "--port", "8000"]
    CMD ["--reload", "--log-level", "error", "--no-access-log"]
    
    
    FROM runtime as prod
    CMD ["--workers", "1", "--log-level", "error", "--no-access-log"]
  23. archef2000 commented on Aug 29, 2023

    @archef2000

    Hello sorry if i ask, but is there currently a way to use the projects of code-server with the desktop app?

  24. Enissay commented on Jun 30, 2024

    @Enissay

    Any update on this please ?

    Or at least if someone could share a workaround to access remote files from ssh through code-server on docker ?

  25. code-asher commented on Jul 1, 2024

    @code-asher
    Member

    We have no plans on working on this, but there is an open source version here: https://github.com/jeanp413/open-remote-ssh

    I have not tried it, but maybe it can be made to work with code-server.

  26. code-asher commented on Jul 1, 2024

    @code-asher
    Member
  27. Enissay commented on Jul 1, 2024

    @Enissay

    Or this extension might work: https://open-vsx.org/extension/Kelvin/vscode-sshfs

    It doesnt sadly, I tried 2 more from the extension list and none worked, they just show empty pages...

    We have no plans on working on this, but there is an open source version here: https://github.com/jeanp413/open-remote-ssh

    I have not tried it, but maybe it can be made to work with code-server.

    Thank you, I will try to figure out how to install it and revert back

  28. MobCode100 commented on Nov 13, 2024

    @MobCode100

    For a workaround, use the extension SSH FS as @code-asher mentioned. It works fine.

  29. Tealk commented on Apr 19, 2025

    @Tealk

    We have no plans on working on this, but there is an open source version here: https://github.com/jeanp413/open-remote-ssh

    The 'Open Remote - SSH' extension is not available in code-server for the Web. Click 'More Information' to learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    extensionThe issue needs to be fixed in the extensionfeatureNew user visible feature

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions