Simpler way to put PDB breakpoints in Python code?

后端 未结 14 2232
不知归路
不知归路 2020-11-30 18:21

Just a convenience question. I\'ve been a bit spoiled with debuggers in IDEs like Visual Studio and XCode. I find it a bit clumsy to have to type import pdb; pdb.set_t

14条回答
  •  日久生厌
    2020-11-30 18:42

    The simplest way to run the debugger on your script is just

    pdb your_script.py
    

    Running pdb on a Linux command-line gives

    usage: pdb.py scriptfile [arg] ...
    

提交回复
热议问题