Skip to content

Conversation

@shreyadesai20042009
Copy link

Fixes #143874

Problem

In remote or dual-terminal debugging setups, expressions evaluated at the pdb
prompt printed their results to the debuggee's stdout instead of the debugger
output stream.

Cause

In remote pdb mode, expression results were printed directly using print(),
bypassing pdb’s output redirection mechanism.

Fix

Route expression output through self.message() so results are sent through the
appropriate pdb output stream, including the socket-based remote debugger.

Tests

Added regression tests to ensure expression evaluation output is correctly routed
in remote pdb sessions.

@bedevere-app
Copy link

bedevere-app bot commented Jan 15, 2026

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@python-cla-bot
Copy link

python-cla-bot bot commented Jan 15, 2026

All commit authors signed the Contributor License Agreement.

CLA signed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pdb: some expression results are printed to the debuggee stdout

1 participant