tasks.json
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version":
"0.1.0",
"command":
"g++",
"isShellCommand":
true,
"args": [
"-g",
"${file}",
"-o",
"${workspaceRoot}/${fileBasename}.out"],
"showOutput":
"always"
}
launch.json
{
"version":
"0.2.0",
"configurations": [
{
"name":
"(gdb) Launch",
"type":
"cppdbg",
"request":
"launch",
"program":
"${file}.out",
"args": [],
"stopAtEntry":
false,
"cwd":
"${workspaceRoot}",
"environment": [],
"externalConsole":
true,
"MIMode":
"gdb",
"miDebuggerPath" :
"/usr/bin/gdb",
"setupCommands": [
{
"description":
"Enable pretty-printing for gdb",
"text":
"-enable-pretty-printing",
"ignoreFailures":
true
}
]
}
]
}
配置之前安装xterm,g++编译器,gcc编译器,clang,gdb编译器