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"
}
]
}