Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

pdb: some expression results are printed to the debuggee stdout #143874

Closed
Labels
stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error
@hyongtao-code

Description

@hyongtao-code

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)
Image

CPython versions tested on:

CPython main branch

Operating systems tested on:

Windows

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2026 Movatter.jp