VSCODE 配置C++运行环境

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编译器



猜你喜欢

转载自blog.csdn.net/m0_37292648/article/details/78348351
今日推荐