Skip to content
Author: Tianle Yuan


VS Code + Docker. Especially useful on Windows, but can be handy on MacOS too. For a step-by-step guide, see VS Code-Docker for editing Swift on Win10 .

Here is Tianle Yuan’s own summary from Slack.

  1. Install the extensions of the swift, docker, and dev containers in vs code.

  2. run docker

  3. run vs code and click the docker logo on the left sidebar.

  4. run the image in vscode terminal and open the swift image in the container as u did in the docker desktop

For testing ur swift code:

  1. ctrl + shift + p

  2. in command window at the top, enter: docker containers: attach shell

  3. swift test in your terminal

For example:

Moreover, you can even get the following instead, which looks more like what you get in Xcode:

See VS Code - Docker for a nice Swift edition on Windows10 for more details.

Last update: December 4, 2022 05:57:23
Created: November 3, 2022 06:58:10