-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
Description
Feature or enhancement
Proposal:
Currently, the inline breakpoints (breakpoint()
or pdb.set_trace()
) will create a new pdb instance, which breaks all the instance-specific feature for pdb. For example, all the display
s will be discarded. The last_cmd
will be lost so <Enter>
will not repeat the last command you type. Breakpoints will be preserved but the corresponding commands won't exist anymore. Everything stored in the pdb instance will not work anymore.
We should make inline breakpoints work as the real breakpoints set in the debugger - just break there and keep everything. My approach is to store the last pdb instance created and use that in pdb.set_trace()
. This solves all the issues above and I think it's the right way to go.
It will also make features the rely on data on instance possible with inline breakpoints.
Very few existing code will be impacted.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response