-
Notifications
You must be signed in to change notification settings - Fork 152
Open
Description
The b/breakpoint statement seems to ignore __debuggerskip__ when given a function to break at.
I expected it to skip the wrapper function, and instead break in the wrapped function (func), but instead it breaks on the wrapper function.
In [7]:
...: def decorator(_f):
...: def wrapper():
...: # actually stops here
...: __tracebackhide__ = True
...: __debuggerskip__ = False
...: return _f()
...: return wrapper
...:
...: @decorator
...: def func():
...: # expected to break here
...: pass
...:
...: def caller():
...: import ipdb
...: ipdb.set_trace()
...: # here, type 'b func' to set a breakpoint
...: # Then 'c' to continue
...: func()
...:
In [8]: caller()
> <ipython-input-7-6874cfbb10f3>(19)caller()
17 # here, type 'b func' to set a breakpoint
18 # Then 'c' to continue
---> 19 func()
ipdb> b func
Breakpoint 3 at <ipython-input-7-6874cfbb10f3>:2
ipdb> c
> <ipython-input-7-6874cfbb10f3>(4)wrapper()
3 # actually stops here
----> 4 __tracebackhide__ = True
5 __debuggerskip__ = False
ipdb>version info:
- python '3.10.12 (main, Feb 4 2025, 14:57:36) [GCC 11.4.0]'
- ipython==8.37.0
- ipdb==0.13.13
berserkerPrehistoric-00
Metadata
Metadata
Assignees
Labels
No labels