Ubuntu下Vscode多文件编译运行
默认单个文件gdb launch已经没问题了.
我是做一个TCP Server和Client的通信,下面是我的文件树
tasks.json
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build server",//在Launch李要用到
"type": "shell",
"command": "g++",
"args": ["-g", "${workspaceFolder}/src/server.cpp", "-std=c++11", "-o", "${workspaceFolder}/build/server.out"]//生成out文件到build文件夹
},
{
"label": "build client",
"type": "shell",
"command": "g++",
"args": ["-g", "${workspaceFolder}/src/client.cpp", "-std=c++11", "-o", "${workspaceFolder}/build/client.out"]
}
]
}
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":