赞
踩
若运行命令为 python -m x.test --args
python3 -m pip install debugpy
python3 -m debugpy --listen 5678 --wait-for-client -m x.test --args
.vscode
文件夹下创建 launch.json
{ // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "name": "Python: Attach", "type": "python", "request": "attach", "connect": { "host": "localhost", "port": 5678 } } ] }
Ctrl + F5
或 F5
开始调试参考链接
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。