Visual Studio Code
Frist step:download vscode and basic modules
download
- C/C++
- Code Runner
- Markdown All in one
Second step:install gcc gdb
apt install g++
Third step:initilzation Configuration to reach c/c++’s bulid
run
and debug
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": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/${fileBasenameNoExtension}.out",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
// "preLaunchTask": "g++",
"preLaunchTask": "build",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}
tasks.json
{
// "version": "0.1.0",
"command": "g++", // 编译C程序。可以换成 echo 来调试命令参数
"isShellCommand": true,
"tasks": [
{
"taskName": "build", // 任务名
"suppressTaskName": true,
"args": ["-g", "-o", "${fileBasenameNoExtension}.out", "${file}"], // 命令参数
"problemMatcher": {
"owner": "cpp",
"fileLocation": ["relative", "${workspaceRoot}"],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
}
}
]
}
How To Install Apache Tomcat 8 on Ubuntu 16.04
How To Install Apache Tomcat 8 on Ubuntu 16.04
More
when i think of it