Starting python debugger automatically on error

前端 未结 13 2210
南方客
南方客 2020-11-27 08:44

This is a question I have wondered about for quite some time, yet I have never found a suitable solution. If I run a script and I come across, let\'s say an IndexError, pyth

相关标签:
13条回答
  • 2020-11-27 09:40

    To have it run without having to type c at the beginning use:

    python -m pdb -c c <script name>
    

    Pdb has its own command line arguments: -c c will execute c(ontinue) command at start of execution and the program will run uninterrupted until the error.

    0 讨论(0)
提交回复
热议问题