本网站可以通过分类标签帮助你快速筛选出你想看的文章,记住地址:www.Facec.cc

vscode调试python代码

.vscode文件夹

  • launch.json
{
  // 使用 IntelliSense 了解相关属性。 
  // 悬停以查看现有属性的描述。
  // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Python: base",
      "type": "debugpy",
      "request": "launch",
      "program": "${file}",
      "console": "integratedTerminal",
      "justMyCode": true,
       //环境名对应的python路径
      "python": "/Users/Apple/anaconda3/bin/python"
  },
  {
      "name": "Python: gy",
      "type": "debugpy",
      "request": "launch",
      "program": "${file}",
      "console": "integratedTerminal",
      "justMyCode": true,
      "python": "/Users/Apple/anaconda3/envs/gy/bin/python",
      // "args": [
      //   "--config",
      //   "${workspaceFolder}/config/odoo.conf", //workspaceFolder是vscode当前打开的目录
      // ],

  }
  ]
}

# python   vscode  

评论