@@ -159,6 +159,41 @@ stop # Stop all docker-compose services
159159test # Run the Django test runner without coverage
160160```
161161
162+ ## Using VS Code
163+
164+ ### Install the required extensions
165+ * Docker
166+ * Pylance
167+ * Dev Containers
168+
169+ ### Start Project in a Dev Container
170+ * In a terminal run docker compose with ` docker compose up `
171+ * Open the project in VS Code and click on "Reopen" on the notification that
172+ says, "Folder contains a Dev Container configuration file. Reopen"
173+
174+ ### Debugging Views
175+ * Open the project in a dev container (see above section)
176+ * Set a breakpoint in a Django View
177+ * Go to Run and Debug (CMD+SHIFT+D)
178+ * Click the run icon next to "Django Runserver"
179+ * If you get a prompt that says "Configured debug type 'python' is not supported." Then click "Install python Extension"
180+ and then click the "Install in Dev Container" button.
181+ * In your browser go to the view that has the breakpoint and VS Code should pause at your breakpoint when it's hit.
182+
183+ ### Running Tests
184+ * Open the project in a dev container (see above section)
185+ * Hit CMD+SHIFT+D and search for "Testing: Focus on Test Explorer View". If this doesn't show up make sure you install
186+ the python extension in the dev container.
187+ * Find a test and run it.
188+
189+ ### Using Git
190+ When working inside a Dev Container you might get a notification that says, "Git not found. Install it or configure it
191+ using the "git.path" setting." It's probably best to click, the "Don't Show Again" button. This is because Git isn't
192+ installed inside the container. You could install it by updating the ` config/docker/Dockerfile.web ` file to install it,
193+ but it's probably not worth adding the extra space to the container. It's probably easier to just use Git in another
194+ local window or a different Git client.
195+
196+
162197## Deploying to Production
163198
164199The Django base site is designed to be production ready because it comes with a production
0 commit comments