vscode 的使用
1、VScode:添加头文件路径
按F1
或 Ctrl+Shift+p
在弹出的备选选项中选择 C/C++:Edit Configuration(JSON)
,自动打开c_cpp_properties.json
配置文件
在includePath中添加头文件路径
"includePath": [ "${workspaceFolder}/**", "~/ros2_install/ros2-linux/**"
2、样式修改
打开setting.json,复制下面:
{ "editor.fontFamily": "Consolas, 'Courier New', monospace", "editor.codeLensFontSize": 18, "editor.fontSize": 18, "workbench.colorTheme": "Visual Studio Light - C++", "editor.defaultFormatter": "ms-vscode.cpptools", "editor.definitionLinkOpensInPeek": true, "editor.fontLigatures": false, "cmake.configureOnOpen": true, "editor.codeActionsOnSave": null }