Skip to content

Provide docs for VSCode Remote Development #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
0xTim opened this issue Dec 24, 2021 · 4 comments · Fixed by #101
Closed

Provide docs for VSCode Remote Development #82

0xTim opened this issue Dec 24, 2021 · 4 comments · Fixed by #101
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@0xTim
Copy link
Member

0xTim commented Dec 24, 2021

We should provide documentation for how to set up a development environment in VSCode with the extension using VSCode Remote Development. May be related to #81

Here's an old article that should still mostly apply https://medium.com/@ianpartridge/swift-development-in-docker-using-visual-studio-code-remote-b84d035e70db

@adam-fowler adam-fowler added the documentation Improvements or additions to documentation label Dec 24, 2021
@iainsmith
Copy link

iainsmith commented Dec 24, 2021

Here's a link to the existing community swift devcontainer, that uses a different plugin. GitHub codespaces provides a setup flow that lets people select from the list of languages in the linked Microsoft repo.

Personally I think it's reasonable to migrate the official devcontainer setup from the existing plugin to the SSWG plugin.

There is also some existing node setup in the existing swift devcontainer that could be trimmed out.

Example of swift package with a devcontainer on the existing devcontainer.

@pvzig
Copy link

pvzig commented Dec 24, 2021

Not sure what the state of the world is in terms of the best lldb extension for VS Code but using the one mentioned in the linked article worked for me.

Using a Dockerfile from the swift:5.5.2 image with this devcontainer config:

{
  "name": "Test",
  "build": { "dockerfile": "Dockerfile" },
  "extensions": [
    "sswg.swift-lang",
    "vadimcn.vscode-lldb"
  ],
  "settings": {
    "lldb.adapterType": "bundled",
    "lldb.executable": "/usr/bin/lldb"
  }
}

@adam-fowler
Copy link
Contributor

This is all you need for a dev container

{
    "name": "Swift 5.5",
    "image": "swift:5.5",
    "extensions": [
      // vscode-lldb is automatically loaded as swift-lang is dependent on it
      "sswg.swift-lang",
    ],
    "settings": {
      // this setting stops the swift extension trying to set the linux lldb path in your workspace
      "lldb.library": "/usr/lib/liblldb.so"
    }
}

@adam-fowler
Copy link
Contributor

The Microsoft provided swift devcontainer references the other swift extension and does bad things like install its own version of lldb. We should get this fixed.

@0xTim 0xTim self-assigned this Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants