Python 尝试退出终端中的pdb时引发BdbQuit错误

Python 尝试退出终端中的pdb时引发BdbQuit错误,python,debugging,pdb,Python,Debugging,Pdb,我制作了一个名为test.py的python文件,其中包含以下内容: if __name__=="__main__": x = 5 breakpoint() print('whatever') 然后,我尝试使用pdb进行调试: ➜ test git:(master) ✗ python test.py > /home/test/test.py(4)<module>() -> print('whatever') 为什么会发生这

我制作了一个名为
test.py
的python文件,其中包含以下内容:

if __name__=="__main__":
    x = 5
    breakpoint()
    print('whatever')
然后,我尝试使用
pdb
进行调试:

➜  test git:(master) ✗ python test.py
> /home/test/test.py(4)<module>()
-> print('whatever')
为什么会发生这种情况?我能修一下吗?如果是,怎么做

(Pdb) q
Traceback (most recent call last):
  File "test.py", line 4, in <module>
    print('whatever')
  File "test.py", line 4, in <module>
    print('whatever')
  File "/home/user/.pyenv/versions/3.8.6/lib/python3.8/bdb.py", line 88, in trace_dispatch
    return self.dispatch_line(frame)
  File "/home/user/.pyenv/versions/3.8.6/lib/python3.8/bdb.py", line 113, in dispatch_line
    if self.quitting: raise BdbQuit
bdb.BdbQuit