Skip to content

Debugpy

An implementation of the Debug Adapter Protocol for Python

Command Line

python -m debugpy
    --listen | --connect
    [<host>:]<port>
    [--wait-for-client]
    [--configure-<name> <value>]...
    [--log-to <path>] [--log-to-stderr]
    <filename> | -m <module> | -c <code> | --pid <pid>
    [<arg>]...

Quick and Easy

Running a script
python -m debugpy --listen 5678 --wait-for-client ./myscript.py
Running a module
python -m debugpy --listen 5678 --wait-for-client -m mymodule
Running code string
python -m debugpy --listen 5678 --wait-for-client -c "import sys;print(sys.argv)"

See also

Favorite site