generated from TheLartians/ModernCppStarter
-
Notifications
You must be signed in to change notification settings - Fork 3
IDE Setting
Aaron Robert edited this page Apr 25, 2020
·
2 revisions
-
Install extension: Xaver: Clang-Format
-
For Ubuntu: install clang-format
search clang-format with below command first:
sudo apt-cache search clang-format
Install which version you want to install such as:
sudo apt-get install clang-format-9
- In ./vscode/settings.json, set:
"clang-format.executable": "/usr/bin/clang-format-9"
You can use whereis clang-format-9
to locate your clang-format executable.
- In ./.vscode/launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "Standalone",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/build/standalone/Smark",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "BuildStandalone"
}
]
}
- In ./.vscode/tasks.json
{
"tasks": [
{
"type": "shell",
"label": "BuildStandalone",
"command": "cmake -DCMAKE_CXX_FLAGS=-g -Hstandalone -Bbuild/standalone && cmake --build build/standalone",
"options": {}
}
],
"version": "2.0.0"
}