Skip to content
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

update instructions, cache dir for VS Code debugging #194

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,20 @@ development instance in your `.env` file:
USE_DEBUGPY_FOR_DEV=true
```

Next run the install script to install debugpy:

docker compose -f docker-compose.dev.yml run -u root ckan-dev ./install_src.sh

Then start the containers in [development mode](#development-mode) and launch VS Code.

In VS Code:

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

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

Expand Down
4 changes: 2 additions & 2 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ volumes:
pip_cache:
site_packages:
local_bin:
vscode_server:
home_dir:

services:

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