Skip to main content

CKAN extension to enable PyCharm remote debugging

Project description

ckanext-pycharm-debugger

CKAN extension that provides PyCharm remote debugger session attachment

Based off the good work of https://github.com/NaturalHistoryMuseum/ckanext-dev/ which is now archived 6 years ago.

Not affiliated with JetBrains.

Pycharm is a trademark of JetBrains s.r.o.
This project is not affiliated with, endorsed by, or sponsored by JetBrains.
The trademark is used here only to describe the tool this extension integrates with, in accordance with fair use.
This project is licensed under the terms of the

Setup

To enable the remote debugger session, you need:

  1. Install the pydevd-pycharm.egg package on the remote machine (this file is part of the PyCharm distribution, see https://www.jetbrains.com/help/pycharm/remote-debugging-with-product.html)

or

bash pip install ckanext-python-debugger['PyCharm2025.1.1']'

or

bash pip install ckanext-python-debugger['PyCharm2024.1.4']'

or

bash pip install pydevd-pycharm ~= ##What your pycharm pro ide suggests##'

  1. Add the line 'debug.remote = True' to your configuration file (this is independent of Ckan's debug setting ; both can be enabled or disabled separately) ;

  2. Add the plugin ckan.plugins = ... pycharm_debugger to your configuration file.

  3. Setup a Remote Debugger within PyCharm, using port 5678 (or as defined by debug.host.port).

You may optionally define:

  • debug.remote.host.ip for the host IP (defaults to host.docker.internal which is the default host when using Docker) ;
  • debug.remote.host.port for the host port (defaults to 5678; it needs to match the setting in PyCharm) ;
  • debug.remote.stdout_to_server to send stdout to the debugging host (defaults to True) ;
  • debug.remote.stderr_to_server to send stderr to the debugging host (defaults to True) ;
  • debug.remote.suspend defines whether the debugger should break as soon as it is started (defaults to True).
  1. Ensure that pycharm remote debugging server is running on port 5678 (default) '

  2. Start CKAN

  cd test-infrasturcture
  docker compose exec ckan  ckan -c ckan.ini run -H 0.0.0.0
  1. If you wish to use in pytest, place the following above your test class
  @pytest.mark.ckan_config(u'ckan.plugins', u'pycharm_debugger')
  @pytest.mark.ckan_config(u'debug.remote', u'True')

Requirements

Compatibility with core CKAN versions:

CKAN version Compatibility
2.7 untested
2.8 untested
2.9 untested
2.10 yes
2.11 yes
master yes as of 2025/05 (check test results)

License

Not affiliated with JetBrains.

Pycharm is a trademark of JetBrains s.r.o.
This project is not affiliated with, endorsed by, or sponsored by JetBrains.
The trademark is used here only to describe the tool this extension integrates with, in accordance with fair use.
This project is licensed under the terms of the

GNU Affero General Public License v3.0 (AGPL-3.0)

See the LICENSE file for full details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ckanext_pycharm_debugger-0.0.1.tar.gz (19.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ckanext_pycharm_debugger-0.0.1-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file ckanext_pycharm_debugger-0.0.1.tar.gz.

File metadata

  • Download URL: ckanext_pycharm_debugger-0.0.1.tar.gz
  • Upload date:
  • Size: 19.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ckanext_pycharm_debugger-0.0.1.tar.gz
Algorithm Hash digest
SHA256 f57312db639e877b00e4707b47ba65cf2d09d52b133e83a5705fe2183498742e
MD5 d9697e9ee618e5fe9407525ae214b05c
BLAKE2b-256 9d3fc3015a2c51aeeb06510349054f1c72d00c321225fb852bde72c5b1eaece8

See more details on using hashes here.

Provenance

The following attestation bundles were made for ckanext_pycharm_debugger-0.0.1.tar.gz:

Publisher: publish.yml on duttonw/ckanext-pycharm-debugger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ckanext_pycharm_debugger-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ckanext_pycharm_debugger-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 04ae307568a65b5c8912772c89903086adcb1b6fbf5e71e777237d533ea81e28
MD5 cf27a68a439c5206d6f98f436753a50c
BLAKE2b-256 8ae3952f8de1309f810b5d87caf01441c6110887b3fcf1581732002943d550fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for ckanext_pycharm_debugger-0.0.1-py3-none-any.whl:

Publisher: publish.yml on duttonw/ckanext-pycharm-debugger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page