{
"C_Cpp.default.includePath": [
"/usr/include/atk-1.0",
"/usr/include/at-spi-2.0",
"/usr/include/at-spi2-atk/2.0",
"/usr/include/cairo",
"/usr/include/dbus-1.0",
"/usr/include/freetype2",
"/usr/include/gdk-pixbuf-2.0",
"/usr/include/gio-unix-2.0/",
"/usr/include/glib-2.0",
"/usr/include/gtk-3.0",
"/usr/include/harfbuzz",
"/usr/include/libpng16",
"/usr/include/pango-1.0",
"/usr/include/pixman-1",
"/usr/lib/x86_64-linux-gnu/dbus-1.0/include",
"/usr/lib/x86_64-linux-gnu/glib-2.0/include"
],
"C_Cpp.default.intelliSenseMode": "gcc-x64"
}
Type: LanguageService
This is coming from a new C/C++ user of VSCode (I've coded in C/C++ for a long time, and in VSCode for other languages for a couple years now), but I found this unintuitive (= spent an hour pulling my hair out). Some of it is definitely confusion over where pieces of VSCode live and what belongs to whom, but it's just from installing the "C/C++ extension" to do C/C++ development.
Describe the bug
Intellisense does not examine/respect/yell at silly users who update the
C_Cpp.default.includePathsetting insettings.jsonin a way that conflicts withincludePathinc_cpp_properties.json.To Reproduce
cannot open source file "gtk/gtk.h"c_cpp_properties.jsonfile (accidentally) by invoking the UI. I got there through a tooltip in the lower-right corner, but this is displayed inconsistently; to consistently get there, invoked the commandC/C++: Edit configurations (UI)./usr/include.cannot open source file "gtk/gtk.h"a. Realize your mistake, and that the correct command to get the include directories for GTK is
pkg-config --cflags-only-I gtk+-3.0 | xargs -n 1 echo | sed -e 's/^-I//' | sort | uniq.b. Sadly, this bit of arcane knowledge will not win any bar bets.
#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit.includePath.settings.json.a. Note the lack of mention of
c_cpp_properties.json.settings.json:cannot open source file "gtk/gtk.h"Expected behavior
Intellisense settings aren't so far removed from VSCode-native integration. That could be abolishing the separate
c_cpp_properties.jsonfile so it's all managed through the VSCode native settings dialog, automagically merging the two, etc.Less preferred, but still would've saved me time: yelling at the user when folder-based
settings.json/C_Cpp.default.includePathandc_cpp_properties.json/configurations.includePathare both set/conflict andsettings.jsonis being ignored.Screenshots
Additional context