Skip to content

remote os calls in remote installed extension do not work #252269

Open
@uinstinct

Description

@uinstinct

Does this issue occur when all extensions are disabled?: Yes

The VSCode documentation states that remote extension has access to remote OS APIs. I have an extension installed on the remote host using the "Install Local Extensions in" button. Still when I try to run a simple command like ls -a it runs on the local computer rather than the remote host.

  • VS Code Version: 1.101.1 (Universal)
  • OS Version: Darwin arm64 24.5.0

Steps to Reproduce:

  1. Create a vscode extension with extensionKinds as ["ui", "workspace"]
  2. In the extension run the following code
import child_process from "node:child_process";
child_process.exec(
      "ls -a",
      // { cwd: relativeDir },
      (error, stdout, stderr) => {
        console.log("debug1 stdout ", stdout);
        console.log("debug1 std err", stderr);
        if (error) {
          console.log("ls not found", error);
        } else {
          console.log("ls found");
        }
      },
    );
  1. Install the extension
  2. Open a remote connection (I did a remote connection using ssh via docker)
  3. See that the command produces output for the local computer and not the remote host

I have my extension installed inside the remote host
Image

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions