在c_cpp_properties.josn文件中,complierPath的问题解决如下 如果正在编译c++文件,先在终端输入which g++ 我的弹出了 /usr/bin/g++ 把这个路径放在compilerPath后面即可