Search code examples
pythondebuggingmacos-high-sierra

Python debugger pdb not found on macOS High Sierra


The PythonDebuggingTools documentation says that the Python debugger pdb is "part of all Python installations", yet I can't find it under macOS High Sierra:

pdb: command not found

Is it supposed to be installed as normal part of macOS these days?


Solution

  • There is not a command named pdb, but you could invoke pdb from shell with:

    python -m pdb your_script.py
    

    you could read more methods to invoke pdb in its doc.