vscode 中自己使用的 launch.json 设置
【代码】vscode 中自己使用的 launch.json 设置。
·
文章目录
在你的工作区创建(或编辑).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 Debugger: Current File with Arguments",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"args": "${command:pickArgs}"
}
]
}
设置不需要输入参数:
"args": [], // 不需要输入参数
设置使用当前激活的环境:
"python": "${command:python.interpreterPath}", // 使用当前激活的环境
// "python": "/home/iip/miniconda3/envs/tvdiag/bin/python", // 指定tvdiag环境的解释器
设置程序调试中将哪个路径设置成的项目根目录(相对路径使用该路径作为前置路径):
"cwd": "${workspaceFolder}", // 将工作目录设置为项目根目录,可以自行添加指定路径
设置环境变量:
"env": {
"ROOT_PATH": "/home/iip/tp/027-failure_diagnosis/008-FeiGSS_Eadro/data"
},
更多推荐
所有评论(0)