diff --git a/README.md b/README.md index 09c50b5b..751dc010 100644 --- a/README.md +++ b/README.md @@ -165,6 +165,10 @@ 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: @@ -172,8 +176,9 @@ 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. diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 8d722ac6..6e8bfc99 100755 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -5,7 +5,7 @@ volumes: pip_cache: site_packages: local_bin: - vscode_server: + home_dir: services: @@ -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"]