Skip to content

Commit 31e39c8

Browse files
authored
Merge pull request #194 from ckan/debugpy-fix
update instructions, cache dir for VS Code debugging
2 parents d2d856d + 7c3fb39 commit 31e39c8

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,15 +165,20 @@ development instance in your `.env` file:
165165
USE_DEBUGPY_FOR_DEV=true
166166
```
167167

168+
Next run the install script to install debugpy:
169+
170+
docker compose -f docker-compose.dev.yml run -u root ckan-dev ./install_src.sh
171+
168172
Then start the containers in [development mode](#development-mode) and launch VS Code.
169173

170174
In VS Code:
171175

172176
1. Install the "Dev Container" extension: press CTRL+SHIFT+X, type "dev container", click "install"
173177
2. Click the "Open a Remote Window" button in the bottom-left of the VS Code window
174178
3. Click "Attach to Running Container..." and select your ckan-dev container, e.g. "ckan-docker-ckan-dev-1"
175-
4. Click the "Run and Debug" icon on the left panel then "create a launch.json", select "Python Debugger", "Remote Attach", host "localhost" and port "5678"
176-
5. Press F5 or click the "Run" menu and "Start Debugging"
179+
4. Click the "Run and Debug" icon on the left panel and choose to install the "Python Debugger"
180+
5. Click "create a launch.json", select "Python Debugger", "Remote Attach", host "localhost" and port "5678"
181+
6. Press F5 or click the "Run" menu and "Start Debugging"
177182

178183
You can now set breakpoints and remote debug your CKAN development instance.
179184

docker-compose.dev.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ volumes:
55
pip_cache:
66
site_packages:
77
local_bin:
8-
vscode_server:
8+
home_dir:
99

1010
services:
1111

@@ -29,7 +29,7 @@ services:
2929
- pip_cache:/root/.cache/pip
3030
- site_packages:/usr/local/lib/python3.10/site-packages
3131
- local_bin:/usr/local/bin
32-
- vscode_server:/root/.vscode-server
32+
- home_dir:/srv/app/
3333
restart: unless-stopped
3434
healthcheck:
3535
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:5000"]

0 commit comments

Comments
 (0)