You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 displays 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
Feature or enhancement
Proposal:
Currently, the inline breakpoints (
breakpoint()
orpdb.set_trace()
) will create a new pdb instance, which breaks all the instance-specific feature for pdb. For example, all thedisplay
s will be discarded. Thelast_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
Linked PRs
The text was updated successfully, but these errors were encountered: