csspin_python.debugpy

The debugpy plugin provisions debugpy and provides configuration that can be used in other plugins of csspin_python to run debugpy in order to debug Python code.

This plugin doesn’t need to be activated within a spinfile.yaml, it rather must be used as dependency in other plugins that require debugpy and want to use the configuration of the debugpy plugin.

How to use the debugpy plugin within other plugins?

To use the debugpy plugin within other plugins, the plugin must be added as a dependency and can be used as follows:

Using the debugpy plugin within another plugin
from spin import config, task, option, sh

defaults = config(
    requires=config(
        spin=[
            "csspin_python.debugpy",
            "csspin_python.python",
        ],
    )
)


@task
def dummy(cfg, debug: option("--debug", is_flag=True), args):
    if debug:
        sh("debugpy", *cfg.debugpy.opts, "-m", "something", args)
    else:
        sh("python", "-m", "something", args)

debugpy schema reference

debugpy: 'object'

Configuration of the debugpy plugin for spin

debugpy.enabled: 'bool'

Enable debugpy for usage.

debugpy.opts: 'list'

Additional options used when executing debugpy.

debugpy.schema: 'object'
debugpy.requires: 'object'
debugpy.requires.spin: 'list'
debugpy.requires.python: 'list'
debugpy._requires: 'list'