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
{{ message }}
Repository navigation
Inline breakpoints should use the most recent pdb isntance, instead of creating a new one #121450
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
Activity
gh-121450: Make inline breakpoints use the most recent pdb instance (#…
pythongh-121450: Make inline breakpoints use the most recent pdb inst…
pythongh-121450: Make inline breakpoints use the most recent pdb inst…