You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* It's also helpful to review the [official guide on configuring VS Code for Swift](https://www.swift.org/documentation/articles/getting-started-with-vscode-swift.html) and install Swift extension.
22
22
@@ -74,11 +74,13 @@ Let's make sure you can build and run locally first. Try running the debugger. T
74
74
Now, let's tell VS Code how to build our container.
75
75
76
76
1. Open the command palette (**Cmd+Shift+P** / **Ctrl+Shift+P**).
77
-
2. Type and select **"Remote-Containers: Add Development Container Configuration Files..."**.
78
-
3. Choose **"Docker from Docker Compose"**.
79
-
4. Select **"Default Configuration"**.
80
-
5. When prompted to add features, select **"AWS CLI"**.
81
-
6. You can also select `.github/dependabot.yml` if you plan to use it.
77
+
2. Type and select **"Dev Containers: Add Dev Container Configuration Files..."**.
78
+
3. Choose **"Add configuration to workspace"**.
79
+
4. Choose **"Docker outside of Docker Compose"**.
80
+
5. Select **"latest"**.
81
+
6. Select the default options
82
+
7. When prompted to add features, select **"AWS CLI"**.
83
+
8. You can also select `.github/dependabot.yml` if you plan to use it.
82
84
83
85
This will create a `.devcontainer` folder with a `devcontainer.json` and `docker-compose.yml` file.
84
86
@@ -176,6 +178,9 @@ services:
176
178
security_opt:
177
179
- seccomp:unconfined
178
180
181
+
# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
182
+
# (Adding the "ports" property to this file will not forward from a Codespace.)
1. Open the command palette (**Cmd+Shift+P** / **Ctrl+Shift+P**).
203
-
2. Type and select **"Remote-Containers: Rebuild and Reopen in Container"**.
208
+
2. Type and select **"Dev Containers: Rebuild and Reopen in Container"**.
204
209
205
210
VS Code will now build your `Dockerfile`, start the `docker-compose` services (your Swift app and LocalStack), and reload the window, connecting you *inside* the `app` container. You'll know it worked when the bottom-left corner of VS Code shows "Dev Container: ...".
206
211
@@ -209,8 +214,9 @@ VS Code will now build your `Dockerfile`, start the `docker-compose` services (y
209
214
Remember that old `launch.json` from Step 5? It's pointing to your *local* machine's paths, which don't exist inside the container. Let's fix it.
210
215
211
216
1. You can delete the old `.vscode/launch.json` file if you want, or just let this next step overwrite it.
212
-
2. Open the command palette (**Cmd+Shift+P** / **Ctrl+Shift+P**).
213
-
3. Type and select **"Swift: Generate Launch Configuration"**.
217
+
2. Select the `Package.swift` file in the Explorer to make it the active file.
218
+
3. Open the command palette (**Cmd+Shift+P** / **Ctrl+Shift+P**).
219
+
4. Type and select **"Swift: Generate Launch Configuration"**.
214
220
215
221
This will create a *new* `launch.json` with the correct *container* paths (e.g., `/workspaces/SwiftInDevContainer/.build/debug/SwiftInDevContainer`).
216
222
@@ -224,19 +230,18 @@ First, update your `Package.swift` to include `soto-dynamodb`:
0 commit comments