Skip to content

Inconsistent current line indication if the script is edited after entering pdb #112952

@tanloong

Description

@tanloong

Bug report

Bug description:

  1. create a for-loop.py
for i in range(10):
    breakpoint()
    print(i)
  1. run python for-loop.py, entering the pdb interface

  2. insert a line to for-loop.py after breakpoint()

for i in range(10):
    breakpoint()
    print("This is an inserted line.")
    print(i)
  1. run c in pdb and the inserted line will be shown as current line indicated by ->, but the actual current line to be executed is print(i).

  2. run c again. The print(i), instead of the inserted line, will be executed.

CPython versions tested on:

3.12

Operating systems tested on:

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions