From 010fb5dbded48f106009c766c9d6fd50deadcdd7 Mon Sep 17 00:00:00 2001 From: Noah Santschi-Cooney Date: Thu, 14 Jan 2021 14:02:13 +0000 Subject: [PATCH] Added vscode debug, settings and extension config --- .vscode/c_cpp_properties.json | 21 ++++++++++++++++++ .vscode/launch.json | 41 +++++++++++++++++++++++++++++++++++ .vscode/settings.json | 14 ++++++++++++ 3 files changed, 76 insertions(+) create mode 100644 .vscode/c_cpp_properties.json create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000000..df4cf24329 --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,21 @@ +{ + "configurations": [ + { + "name": "Linux", + "includePath": [ + "${workspaceFolder}/src/**", + "/usr/include/llvm-10/**", + "/usr/include/llvm-c-10/**", + "/usr/include/clang/**" + ], + "defines": [], + "compilerPath": "/usr/bin/clang-10", + "cStandard": "gnu17", + "cppStandard": "gnu++17", + "intelliSenseMode": "clang-x64", + "compileCommands": "${workspaceFolder}/build/compile_commands.json", + "configurationProvider": "ms-vscode.cmake-tools" + } + ], + "version": 4 +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000000..73b96c5587 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,41 @@ +{ + // 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": [ + /* { + "type": "lldb", + "request": "launch", + "name": "Launch", + "program": "${workspaceFolder}/bin/lsif-clang", + "args": ["build/compile_commands.json"], + "cwd": "${workspaceFolder}/src" + }, */ + { + "name": "(gdb) Launch", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/bin/lsif-clang", + "args": ["build/compile_commands.json"], + "stopAtEntry": false, + "cwd": "${workspaceFolder}/src", + "environment": [], + "externalConsole": false, + "MIMode": "gdb", + "additionalSOLibSearchPath": "/usr/lib/x86_64-linux-gnu/debug/;/usr/lib/x86_64-linux-gnu/debug/", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + }, + { + "description": "Auto load symbols when loading an .so file", + "text": "set auto-solib-add", + "ignoreFailures": false + } + ] + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..c02d2a15ae --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,14 @@ +{ + // we keep this extension for debugging + "C_Cpp.intelliSenseEngine": "Disabled", + "C_Cpp.autocomplete": "Disabled", // So you don't get autocomplete from both extensions. + "C_Cpp.errorSquiggles": "Disabled", // So you don't get error squiggles from both extensions (clangd's seem to be more reliable anyway). + "clangd.path": "/usr/bin/clangd", + "clangd.arguments": ["-pretty", "--background-index", "--compile-commands-dir=/workspace/lsif-clang"], + "[cpp]": { + "editor.tabSize": 2, + "editor.insertSpaces": true + }, + "cmake.configureOnOpen": false, + "cmake.configureOnEdit": false, +} \ No newline at end of file