Linux command
ipdb 命令
网络
复制后可按需替换文件名、目录或参数。
常用示例
Start ipdb debugger
python -m ipdb [script.py]
Set breakpoint in code
import ipdb; ipdb.set_trace()
Post-mortem debugging
python -m ipdb -c continue [script.py]
Run until exception
ipdb.pm()
说明
ipdb is the IPython-enhanced Python debugger. It provides the same interface as pdb but with syntax highlighting, tab completion, and better introspection from IPython. ipdb makes Python debugging more interactive and user-friendly, especially for exploring variables and understanding program state.
参数
- -c _command_
- Execute command on start.
FAQ
What is the ipdb command used for?
ipdb is the IPython-enhanced Python debugger. It provides the same interface as pdb but with syntax highlighting, tab completion, and better introspection from IPython. ipdb makes Python debugging more interactive and user-friendly, especially for exploring variables and understanding program state.
How do I run a basic ipdb example?
Run `python -m ipdb [script.py]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -c _command_ do in ipdb?
Execute command on start.