okfn / docker-ckan

Docker images and Docker Compose setup for CKAN [Not Maintained]
GNU Affero General Public License v3.0
81 stars 88 forks source link

Debugging 2.9 with debugpy does not work with reloader #83

Open GordianDziwis opened 2 years ago

GordianDziwis commented 2 years ago

I added to the development container startup script ckan-dev/2.9/setup/start_ckan_development.sh, the following line for debugging:

sudo -u ckan -EH python3 -m debugpy --listen 0.0.0.0:5678 /usr/bin/ckan -c $CKAN_INI run -H 0.0.0.0

But this produces this error:

/usr/bin/python3: No module named ckan.__main__; 'ckan' is a package and cannot be directly executed

Disabling the reloader with -r helps.

amercader commented 2 years ago

I don't have experience with this tool so I can't help but maybe these discussions can point you in the right direction:

https://github.com/ckan/ckan/discussions/6457 https://github.com/ckan/ckan/pull/6458