美文网首页
VScode 中开发 python

VScode 中开发 python

作者: bee_37a2 | 来源:发表于2020-04-09 15:49 被阅读0次

调试 Debug

调试单个文件时带 args 调试

新建一个 launch.json, 在configurations下新建一个Json object。其他字段可以参考官方文档。实现带args调试只需要添加 "args": ["foo","bar"]
完整配置文件:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Current File",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "args": ["dev"]
        }
    ]
}

相关文章

网友评论

      本文标题:VScode 中开发 python

      本文链接:https://www.haomeiwen.com/subject/snpcmhtx.html