汕尾商城网站建设,补肾吃什么东西效果最好,电商平台系统,wordpress上传文档文章目录 1、文档2、技巧显示与搜索宏定义和包含头文件 3、插件4、智能编写5、VSCode 与 C#xff08;1#xff09;安装#xff08;2#xff09;调试#xff08;a#xff09;使用 CMake 进行跨平台编译与调试#xff08;b#xff09;launch.json#xff08;c#xff… 文章目录 1、文档2、技巧显示与搜索宏定义和包含头文件 3、插件4、智能编写5、VSCode 与 C1安装2调试a使用 CMake 进行跨平台编译与调试blaunch.jsonc传参 1、文档
官网 官网帮助文档 VSCode 精品教程
2、技巧
显示与搜索
Glob Patterns Reference VS Code 支持以下 glob 语法
/ 分隔路径段* 匹配路径段中的零个或多个字符? 匹配路径段中的一个字符** 匹配任意数量的路径段包括无{} 对条件进行分组例如 {**/*.html,**/*.txt} 匹配所有 HTML 和文本文件[] 声明要匹配的字符范围example.[0-9] 匹配 example.0example.1 … [!...] 否定要匹配的字符范围example.[!0-9] 匹配 example.a、example.b但不匹配 example.0 注意在 Windows 上使用的是 / 来分隔路径而不是 \ 。VS Code 中的 Glob 模式需要 / 分隔路径但它们都会在路径上 / 和 \ 路径内匹配。 .vscode/settings.json 中 files.exclude 控制文件显示search.exclude 控制搜索 。
{files.exclude: {**/*.a.cmd: true,**/*.order.cmd: true,**/*.o.cmd: true,**/*.o.d: true,// **/*.o: true,.github: true,arch/[^a]*: true,arch/a[^r]*: true,arch/arc: true,arch/arm: true,drivers/[^pu]*: true,drivers/p[^c]*: true,drivers/pcmcia: true,drivers/u[^s]*: true,**/.git: true,**/.svn: true,**/.hg: true,**/CVS: true,**/.DS_Store: true,**/Thumbs.db: true,**/*.crswap: true},search.exclude: {**/node_modules: true,**/bower_components: true,**/*.code-search: true},files.associations: {memory_resource: c}
}VScode全局搜索屏蔽、显示屏蔽指定文件类型及文件夹 宏定义和包含头文件 .vscode/c_cpp_properties.json 中 defines 控制宏定义includePath 控制头文件搜索 。
{configurations: [{name: Linux,includePath: [${workspaceFolder}/**],defines: [CONFIG_PCI,CONFIG_USB_XHCI_DBGCAP,MODULE],compilerPath: /usr/bin/gcc,cStandard: c17,cppStandard: gnu17,intelliSenseMode: linux-gcc-x64}],version: 4
}vscode添加宏定义 VSCode#include头文件时找不到头文件我的解决方法
3、插件
使用VScode运行C/C你可能要安装这些插件
VScode如何屏蔽不需要的文件及添加搜索的头文件路径 搜索栏语法_vscode files.exclude_一颗不甘坠落的流星的博客-CSDN博客 vscode工程屏蔽不需要的文件(保持搜索便利)_vscode排除文件夹_蓁蓁啊的博客-CSDN博客
vsCode离线安装remote-ssh插件和搭建远程开发环境 - 爱码网
vscode调试时以16进制查看变量_vscode调试查看变量_虔诚的学习者的博客-CSDN博客
简单的 VSCode 插件离线安装方法_乘风破浪kk的博客-CSDN博客
VSCode使用IDEA快捷键IntelliJ IDEA Keybindings插件使用方法 VSCode 中文乱码设置
4、智能编写
VScode 使用之自动生成文件注释_vscode自动生成注释_会打莎士比亚的猴子的博客-CSDN博客 Doxygen与Vscode操作全解_51CTO博客_vscode使用 Vscode 插件 DoxyGen Documentation Generator C语言详细设置_doxygen vscode C/C工程的文档自动生成工具 Visual Studio CodeVScode自动生成头文件
5、VSCode 与 C
1安装
C programming with Visual Studio Code Visual Studio Code 的 C/C 支持由Microsoft C/C 扩展提供以在 Windows、Linux 和 macOS 上实现跨平台 C 和 C 开发。
安装插件 打开 VS 代码。 选择活动栏上的扩展视图图标或使用键盘快捷键 ( CtrlShiftX )。 搜索’C。 选择安装。
2调试
a使用 CMake 进行跨平台编译与调试
Get started with CMake Tools on Linux vscode-cmake-tools/README.md at main · microsoft/vscode-cmake-tools · GitHub Visual Studio Code Variables Reference 用VSCode和CMake编写调试C/C - 简书 vscodecmake下debug报错Target debugging is no longer supported with the legacy driver
blaunch.json gdb
{version: 0.2.0,configurations: [{name: (gdb) Launch,type: cppdbg,request: launch,// Resolved by CMake Tools:program: ${command:cmake.launchTargetPath},args: [],stopAtEntry: false,cwd: ${workspaceFolder},environment: [{// add the directory where our target was built to the PATHs// it gets resolved by CMake Tools:name: PATH,value: ${env:PATH}:${command:cmake.getLaunchTargetDirectory}},{name: OTHER_VALUE,value: Something something}],console: externalTerminal,MIMode: gdb,setupCommands: [{description: Enable pretty-printing for gdb,text: -enable-pretty-printing,ignoreFailures: true}]}]
}msvc
{version: 0.2.0,configurations: [{name: (msvc) Launch,type: cppvsdbg,request: launch,// Resolved by CMake Tools:program: ${command:cmake.launchTargetPath},args: [],stopAtEntry: false,cwd: ${workspaceFolder},environment: [{// add the directory where our target was built to the PATHs// it gets resolved by CMake Tools:name: PATH,value: ${env:PATH}:${command:cmake.getLaunchTargetDirectory}},{name: OTHER_VALUE,value: Something something}],console: externalTerminal}]
}c传参
vscode cmake命令行参数debug_cmake 命令行 参数_wakaka_Yu的博客-CSDN博客 如何在vscode中将命令行参数传递给cmake-腾讯云开发者社区-腾讯云 .vscode/settings.json 中 cmake.debugConfig 控制传参 。命令行参数 -code 8 配置如下
{cmake.debugConfig: {args: [-code,8]}
}☆