配置
.vscode/launch.json
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
// pythonPath 指定python代码运行路径
"version": "0.2.0",
"configurations": [
{
"name": "Paddle代码调试",
"type": "python",
"request": "launch",
"program": "${file}", // "${workspaceFolder}/tools/test.py"
"console": "integratedTerminal",
"justMyCode": false,
"args": [
"--task_name",
"CoLA",
"--do_train",
"true",
]
}
],
"pythonPath": "/root/miniconda3/envs/sd/bin/python",
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
设置
需要注意的是,要把设置改为允许任何地点打断点debug.allowBreakpointsEverywhere=true
,csharp.debug.justMyCode=false
才能调试其他库
.vscode/settings.json
{
"debug.allowBreakpointsEverywhere": true,
"csharp.debug.justMyCode": false,
"jupyter.debugJustMyCode": false
}
1
2
3
4
5
2
3
4
5