差别
这里会显示出您选择的修订版和当前版本之间的差别。
| 后一修订版 | 前一修订版 | ||
| python:代码调试:python调试入手:python远程调试 [2025/12/18 09:10] – 创建 ctbots | python:代码调试:python调试入手:python远程调试 [2025/12/22 09:23] (当前版本) – ctbots | ||
|---|---|---|---|
| 行 33: | 行 33: | ||
| </ | </ | ||
| + | 可以配置bashrc 实现快速调试; | ||
| + | debugpy xxx.py | ||
| + | 或者 | ||
| + | |||
| + | <code shell bashrc.sh> | ||
| + | debugpy() { | ||
| + | local port=4005 | ||
| + | if [[ $1 =~ ^[0-9]+$ ]]; then | ||
| + | port=$1 | ||
| + | shift | ||
| + | fi | ||
| + | python -m debugpy --listen 0.0.0.0:" | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== 可能遇到的问题 ===== | ||
| + | < | ||
| + | packages/ | ||
| + | |||
| + | self._abc_registry = extra._abc_registry | ||
| + | |||
| + | AttributeError: | ||
| + | </ | ||
| + | |||
| + | 兼容性问题,处理下 typing库 | ||
| + | < | ||
| + | pip uninstall typing -y | ||
| + | pip install --upgrade typing-extensions | ||
| + | </ | ||