如何编译和安装openGauss请参考官方文档。
生成任务文件tasks.json
javascript
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "C/C++: g++ 生成活动文件",
"command": "make -sj && make install -sj",
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "编译器: /home/gauss/binarylibs/buildtools/gcc7.3//gcc/bin/g++"
}
]
}
运行任务文件launch.json
javascript
{
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) 启动",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/dest/bin/gaussdb",
"args": ["-D", "${workspaceFolder}/dest/data", "--single_node"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "为 gdb 启用整齐打印",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"text": "handle SIGUSR1 noprint nostop",
"ignoreFailures": true
},
{
"text": "handle SIGUSR2 noprint nostop",
"ignoreFailures": true
}
]
}
]
}