赞
踩
直接f5会报错,提示你改一下json文件
launch.json
{
“version”: “0.2.0”,
“configurations”: [
{
“name”: “(gdb) Launch”,
“type”: “cppdbg”,
“request”: “launch”,
“program”: “
w
o
r
k
s
p
a
c
e
F
o
l
d
e
r
/
a
.
o
u
t
"
,
"
a
r
g
s
"
:
[
]
,
"
s
t
o
p
A
t
E
n
t
r
y
"
:
f
a
l
s
e
,
"
c
w
d
"
:
"
{workspaceFolder}/a.out", "args": [], "stopAtEntry": false, "cwd": "
workspaceFolder/a.out","args":[],"stopAtEntry":false,"cwd":"{workspaceFolder}”,
“environment”: [],
“externalConsole”: false,
“MIMode”: “gdb”,
“setupCommands”: [
{
“description”: “Enable pretty-printing for gdb”,
“text”: “-enable-pretty-printing”,
“ignoreFailures”: true
}
],
“preLaunchTask”: “build”,
“miDebuggerPath”: “/usr/bin/gdb”
}
]
}
task.json
{
“version”: “2.0.0”,
“tasks”: [
{
“label”: “build”,
“type”: “shell”,
“command”: “gcc”,
“args”: [
“-g”,
“
f
i
l
e
"
,
"
−
o
"
,
"
{file}", "-o", "
file","−o","{fileDirname}/
f
i
l
e
B
a
s
e
n
a
m
e
N
o
E
x
t
e
n
s
i
o
n
.
o
u
t
"
]
,
"
g
r
o
u
p
"
:
"
k
i
n
d
"
:
"
b
u
i
l
d
"
,
"
i
s
D
e
f
a
u
l
t
"
:
t
r
u
e
,
"
p
r
o
b
l
e
m
M
a
t
c
h
e
r
"
:
[
"
{fileBasenameNoExtension}.out" ], "group": { "kind": "build", "isDefault": true }, "problemMatcher": ["
fileBasenameNoExtension.out"],"group":"kind":"build","isDefault":true,"problemMatcher":["gcc”],
“detail”: “Generated task by Debugger.”
}
]
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。