Skip to content

Difficult to debug the module with click used in a python script #33

Open

Description

@tud-mchen6

Is your feature request related to a problem? Please describe.
I was trying to debug workflow/scripts/area_potential.py by adding breakpoints. However, running the module with commands like snakemake run ... then takes forever before it reaches the breakpoint. We suspected that click prevents the breakpoint to be reached by ipdb.
Then, we tried debugging using another method:

  1. type unset PYTHONBREAKPOINT in the terminal;
  2. type -e module python {input.script:q} "{input.shapes}/{wildcards.subunit}.parquet" {input.resampled_path:q} {params.config:q} {params.buffer_crs:q} {output.area_potential:q} --override_config={params.subunit_override_config:q} (replacing specific content with concrete file names) as defined in the rule area_potential.
    This works, but makes the debugging process very cumbersome.

Describe the solution you'd like
Maybe surpass click in some ways, so that debugging directly with snakemake run ... and breakpoints can work as usual. Or remove click.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions