1.本地需要安装ptyhon

2.安装visual studio code, 配置里安装python, 新建文件(工作目录 )

launch.json配置

{
    // 使用 IntelliSense 了解相关属性。 
    // 悬停以查看现有属性的描述。
    // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [

        {
            "name": "Python: Current File(Integrated Terminal)",
            "type": "python",
            "request": "launch",
            "pythonPath": "C:/Users/xqhu/AppData/Local/Programs/Python/Python37/python.exe",  --本地python可执行文件路径
            "program": "${file}",
            "console": "integratedTerminal"
        },
        {
            "name":"Python:Attach",
            "type":"python",
            "request": "attach",
            "port":5678,
            "host":"localhost"
        }
    ]
}
posted on 2019-12-27 20:25  慢乌龟  阅读(2159)  评论(0编辑  收藏  举报