Skip to content

[WIP] bpo-38806: bdb: stop_here: always stop at calling frame #17159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

blueyed
Copy link
Contributor

@blueyed blueyed commented Nov 15, 2019

The following will not stop for debugging:

python3.8 -c 'import pdb; pdb.Pdb(skip=["*"]).set_trace()'

The example is contrived, the real case would be to have some "noisy"
module being excluded in general, but when you add an explicit
"set_trace()" in there it should still stop there, and not on some upper
frame.

This was changed a long time already in
313a751
(Python 2.3), but it is not really clear.
/cc @ctismer

This PR is meant to see how reverting that part goes.

https://bugs.python.org/issue38806

@blueyed blueyed changed the title bpo-38806: bdb: stop_here: always stop at calling frame [WIP] bpo-38806: bdb: stop_here: always stop at calling frame Nov 15, 2019
@blueyed
Copy link
Contributor Author

blueyed commented Nov 15, 2019

Note: with pdbpp I am remembering the frame in Pdb.set_trace already, which could be an option here also?

blueyed added a commit to blueyed/pdbpp that referenced this pull request Nov 19, 2019
This is relevant for when `skip` is used.

Ref: https://bugs.python.org/issue38806
Ref: python/cpython#17159

NOTE: pypy2: needs the extra check for frame, which makes sense in general
      (via test_sigint_in_interaction_without_new_cmdloop).
blueyed added a commit to pdbpp/pdbpp that referenced this pull request Nov 19, 2019
This is relevant for when `skip` is used.

Ref: https://bugs.python.org/issue38806
Ref: python/cpython#17159

NOTE: pypy2: needs the extra check for frame, which makes sense in general
      (via test_sigint_in_interaction_without_new_cmdloop).
The following will not stop for debugging:

    python3.8 -c 'import pdb; pdb.Pdb(skip=["*"]).set_trace()'

The example is contrived, the real case would be to have some "noisy"
module being excluded in general, but when you add an explicit
"set_trace()" in there it should still stop there, and not on some upper
frame.

This was changed a long time already in
python@313a751
(Python 2.3), but it is not really clear.

This PR is meant to see how reverting that part goes.
@python-cla-bot
Copy link

python-cla-bot bot commented Apr 6, 2025

The following commit authors need to sign the Contributor License Agreement:

CLA signed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants