Breakpoints with multiple files

Open
#100,427 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
devtools

Research direction

Reproduce the report on Windows 10 with CPython 3.11.1 using a.py calling bar() in b.py, then follow the debugger's breakpoint and stepping entry points. Confirm that a breakpoint in b.py is reached when execution starts in a.py, and add regression coverage for the expected cross-file behavior.

Written by the indexing model from the issue text.

Description

stdlib type-bug

Bug report

Consider the following structure:
a.py (foo())
'- b.py (bar())
meaning that a.py with foo() calls some function from b.py, namely bar().

Now, add a breakpoint to b.py and let the debugging begin. You will see that the debugger seems to simply overlook the breakpoint in b.py. In other words: Breakpoints are only accepted, if the next line to be executed before clicking on "Go" is in the same file.

This is rather bothersome and does work correctly in other IDEs like Qt for C++.

The solution

Please "step down" to a breakpoint by design.

Your environment

  • CPython versions tested on: 3.11.1
  • Operating system and architecture: Windows 10
Dominant language
Python
Stars
77.2k
Forks
36k
Avg merge
1d 9h
Merged PRs (30d)
558

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from python/cpython

All issues in python/cpython

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.