Feature or enhancement
Proposal:
Currently, if you set a breakpoint() in your code, and exit with q or ctrl+D, the output is just ugly:
Traceback (most recent call last):
File "/Users/gaotian/programs/cpython/example.py", line 11, in <module>
while True:
^^^^
File "/opt/homebrew/Cellar/python@3.12/3.12.6/Frameworks/Python.framework/Versions/3.12/lib/python3.12/bdb.py", line 90, in trace_dispatch
return self.dispatch_line(frame)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.12/3.12.6/Frameworks/Python.framework/Versions/3.12/lib/python3.12/bdb.py", line 115, in dispatch_line
if self.quitting: raise BdbQuit
^^^^^^^^^^^^^
bdb.BdbQuit
It makes no sense to print a trackback of an exception just because I want to quit pdb and stop debugging. Now that we have an indicator for inline mode, we can deal with this.
What I propose is - for inline mode debugging, any quit attempt(q, ctrl+D, etc.) will trigger a confirm prompt (like gdb or lldb), the user can say no and go back to debugging, or they can confirm and quit the program.
There are a few design details which I will list in the following PR.
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
Feature or enhancement
Proposal:
Currently, if you set a
breakpoint()in your code, and exit withqorctrl+D, the output is just ugly:It makes no sense to print a trackback of an exception just because I want to quit pdb and stop debugging. Now that we have an indicator for inline mode, we can deal with this.
What I propose is - for inline mode debugging, any quit attempt(
q,ctrl+D, etc.) will trigger a confirm prompt (likegdborlldb), the user can say no and go back to debugging, or they can confirm and quit the program.There are a few design details which I will list in the following PR.
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