collective.debugtools

May 29, 2026 · View on GitHub

.. This README is meant for consumption by humans and pypi. Pypi can render rst files so please do not use Sphinx features. If you want to learn more about writing documentation, please check out: http://docs.plone.org/about/documentation_styleguide.html This text does not appear on pypi or github. It is a comment.

.. image:: https://github.com/collective/collective.debugtools/actions/workflows/plone-package.yml/badge.svg :target: https://github.com/collective/collective.debugtools/actions/workflows/plone-package.yml

.. image:: https://coveralls.io/repos/github/collective/collective.debugtools/badge.svg?branch=main :target: https://coveralls.io/github/collective/collective.debugtools?branch=main :alt: Coveralls

.. image:: https://codecov.io/gh/collective/collective.debugtools/branch/master/graph/badge.svg :target: https://codecov.io/gh/collective/collective.debugtools

.. image:: https://img.shields.io/pypi/v/collective.debugtools.svg :target: https://pypi.python.org/pypi/collective.debugtools/ :alt: Latest Version

.. image:: https://img.shields.io/pypi/status/collective.debugtools.svg :target: https://pypi.python.org/pypi/collective.debugtools :alt: Egg Status

.. image:: https://img.shields.io/pypi/pyversions/collective.debugtools.svg?style=plastic :alt: Supported - Python Versions

.. image:: https://img.shields.io/pypi/l/collective.debugtools.svg :target: https://pypi.python.org/pypi/collective.debugtools/ :alt: License

===================== collective.debugtools

An add-on for Plone that provides remote debugging via debugpy for developers.

Features

  • Remote debugging — activates debugpy at import time when the DEBUGPY_ENABLED environment variable is set. Supports listening on a configurable host:port and optionally waiting for a debugger client to attach.

Remote debugging (debugpy)

No Plone configuration is needed — the add-on reacts to environment variables when the Python process starts.

Set DEBUGPY_ENABLED to 1, true, or y to activate::

DEBUGPY_ENABLED=1 ./bin/instance fg

Use the following env vars to control the debug server:

DEBUGPY_ENABLED Set to 1, true, or y to enable debugpy. Default: unset (off).

DEBUGPY_HOST Host to bind. Default: localhost.

DEBUGPY_PORT Port to listen on. Default: 5678.

DEBUGPY_WAIT_FOR_CLIENT Set to 1, true, or y to halt Plone start-up until a debugger client connects. Default: unset (no wait).

Example enabling debugpy with wait-for-client::

DEBUGPY_ENABLED=1 DEBUGPY_WAIT_FOR_CLIENT=1 ./bin/instance fg

Any debugpy-compatible client (VS Code, PyCharm, ptvsd, etc.) can then connect to localhost:5678.

Installation

Add collective.debugtools to your buildout::

[buildout]

...

eggs =
    collective.debugtools

Then run bin/buildout and install the add-on in Plone's Add-ons control panel.

Alternatively, install via pip in a Plone environment::

pip install collective.debugtools

Contribute

License

The project is licensed under the GPLv2.