Skip to content

Allow debugger interactions in tests#3235

Open
kdeldycke wants to merge 3 commits intopallets:stablefrom
kdeldycke:fix-clirunner-debugger
Open

Allow debugger interactions in tests#3235
kdeldycke wants to merge 3 commits intopallets:stablefrom
kdeldycke:fix-clirunner-debugger

Conversation

@kdeldycke
Copy link
Collaborator

@kdeldycke kdeldycke commented Feb 28, 2026

This PR patches CliRunner to allow pdb interactions in tests.

CliRunner captures stdout, which breaks pdb.set_trace() and interactive debuggers. You can't debug inside an invoked command because stdout is redirected.

By playing nice with pdb in Click tests, we can improve the experience of developers and maintainers, and as a far reaching goal, maybe improve bug reporting from the community.

This PR:

@kdeldycke kdeldycke changed the title Patch pdb in CliRunner to allow debugger interactions in tests Allow debugger interactions in tests Feb 28, 2026
@kdeldycke kdeldycke added bug f:test runner feature: cli test runner labels Feb 28, 2026
@kdeldycke kdeldycke added this to the 8.3.2 milestone Feb 28, 2026
@kdeldycke kdeldycke force-pushed the fix-clirunner-debugger branch from 1c9a876 to 2e1a7d7 Compare February 28, 2026 12:54
@kdeldycke kdeldycke force-pushed the fix-clirunner-debugger branch from 2e1a7d7 to c040895 Compare February 28, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug f:test runner feature: cli test runner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant