Skip to content

Unable to find Swift toolchain when using Remote SSH #1399

Closed
@matthewbastien

Description

@matthewbastien

Describe the bug
When using VS Code's Remote SSH feature to connect to a Linux machine, the extension fails to find the Swift toolchain even though it is available in PATH.

The workaround is to put the path to the Swift toolchain in the remote machine or workspace settings:

{
   "swift.path": "/home/<REDACTED>/.local/share/swiftly/bin",
}

You can find the path to the Swift toolchain by running which swift.

To Reproduce
Steps to reproduce the behavior:

  1. Install a Swift toolchain on a Linux machine and make it available in PATH.
  2. Use the Remote SSH extension in VS Code to connect to the Linux machine
  3. Install the Swift extension on the remote extension host
  4. An error notification will appear saying that the Swift toolchain could not be found.

Expected behavior
The Swift toolchain should be automatically detected.

Environment

  • Host OS: macOS Sequoia
  • Remote OS: Ubuntu 22.04
  • Swift version 5.10.1 (swift-5.10.1-RELEASE)
  • Visual Studio Code version: 1.97.0
  • vscode-swift version: 2.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions