Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34k
Closed
Description
Bug report
Bug description:
In a dual-terminal / remote debugging setup, some expressions evaluated in pdb print their results to the debuggee’s stdout instead of the pdb output stream. For example, at the pdb prompt:
(lambda: 123)()sum(i for i in (1, 2, 3))
their results appear in the remote/debuggee terminal. I have screenshots and a minimal test case demonstrating the issue.
target.py
# target.pyimportosimporttimeprint("TARGET PID:",os.getpid(),flush=True)print("Target is running... waiting forever.",flush=True)whileTrue:time.sleep(1)
attach.py
# attach.pyimportsysimportpdbpid=int(sys.argv[1])print("Attaching to",pid)pdb.attach(pid)

CPython versions tested on:
CPython main branch
Operating systems tested on:
Windows