news 2026/2/28 16:21:35

VScode中函数和变量跳转定义配置文件设置

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
VScode中函数和变量跳转定义配置文件设置

vscode中有两种方式去设置,一种是基于MinGW ,一种是基于LLVM中的clang工具

配置文件在vscode打开的工程中,路径在I:\TBOX\111\.vscode\settings.json,或者I:\TBOX\222\.vscode\settings.json

两种内容分别如下:

I:\TBOX\111\.vscode\settings.json

{ "files.associations": { "random": "cpp", "stdio.h": "c", "codecvt": "c", "condition_variable": "c", "cstddef": "c", "forward_list": "c", "list": "c", "string": "c", "rope": "c", "future": "c", "limits": "c", "memory": "c", "new": "c", "functional": "c", "regex": "c", "type_traits": "c", "custom_main.h": "c", "rs485_service.h": "c", "net_service.h": "c", "uart_init.h": "c", "exception": "c", "fstream": "c", "iosfwd": "c", "ostream": "c", "shared_mutex": "c", "sstream": "c", "streambuf": "c", "aima_custom_tls.h": "c", "cm_common.h": "c", "tsp_control.h": "c", "tsp_comm.h": "c", "stdlib.h": "c", "string.h": "c", "cm_iomux.h": "c", "typeindex": "c", "typeinfo": "c", "cm_gpio.h": "c", "gnss_service.h": "c", "time.h": "c", "vat_service.h": "c", "array": "c", "string_view": "c", "cm_os.h": "c", "thread": "c", "cmath": "c", "complex": "c", "cjson.h": "c", "sockets.h": "c", "param_service.h": "c", "pm_service.h": "c", "cstring": "c", "cm_fs.h": "c", "base_q.h": "c", "charconv": "c", "mutex": "c", "cstdarg": "c", "chrono": "c", "istream": "c", "ratio": "c", "scoped_allocator": "c", "tuple": "c", "utility": "c", "cm_uart.h": "c", "cm_rtc.h": "c", "coord_transform.h": "c", "soa_api.h": "c", "tsp_event.h": "c", "md.h": "c", "cm_mem.h": "c", "stdint.h": "c", "gbl_types.h": "c", "cm_sys.h": "c", "ota_process.h": "c", "cm_virt_at.h": "c", "sha256.h": "c" }, "C_Cpp_Runner.cCompilerPath": "gcc", "C_Cpp_Runner.cppCompilerPath": "g++", "C_Cpp_Runner.debuggerPath": "gdb", "C_Cpp_Runner.cStandard": "", "C_Cpp_Runner.cppStandard": "", "C_Cpp_Runner.msvcBatchPath": "C:/Program Files/Microsoft Visual Studio/VR_NR/Community/VC/Auxiliary/Build/vcvarsall.bat", "C_Cpp_Runner.useMsvc": false, "C_Cpp_Runner.warnings": [ "-Wall", "-Wextra", "-Wpedantic", "-Wshadow", "-Wformat=2", "-Wcast-align", "-Wconversion", "-Wsign-conversion", "-Wnull-dereference" ], "C_Cpp_Runner.msvcWarnings": [ "/W4", "/permissive-", "/w14242", "/w14287", "/w14296", "/w14311", "/w14826", "/w44062", "/w44242", "/w14905", "/w14906", "/w14263", "/w44265", "/w14928" ], "C_Cpp_Runner.enableWarnings": true, "C_Cpp_Runner.warningsAsError": false, "C_Cpp_Runner.compilerArgs": [], "C_Cpp_Runner.linkerArgs": [], "C_Cpp_Runner.includePaths": [], "C_Cpp_Runner.includeSearch": [ "*", "**/*" ], "C_Cpp_Runner.excludeSearch": [ "**/build", "**/build/**", "**/.*", "**/.*/**", "**/.vscode", "**/.vscode/**" ], "C_Cpp_Runner.useAddressSanitizer": false, "C_Cpp_Runner.useUndefinedSanitizer": false, "C_Cpp_Runner.useLeakSanitizer": false, "C_Cpp_Runner.showCompilationTime": false, "C_Cpp_Runner.useLinkTimeOptimization": false, "C_Cpp_Runner.msvcSecureNoWarnings": false }

I:\TBOX\222\.vscode\settings.json

{ "C_Cpp_Runner.cCompilerPath": "gcc", "C_Cpp_Runner.cppCompilerPath": "g++", "C_Cpp_Runner.debuggerPath": "gdb", "C_Cpp_Runner.cStandard": "", "C_Cpp_Runner.cppStandard": "", "C_Cpp_Runner.msvcBatchPath": "C:/Program Files/Microsoft Visual Studio/VR_NR/Community/VC/Auxiliary/Build/vcvarsall.bat", "C_Cpp_Runner.useMsvc": false, "C_Cpp_Runner.warnings": [ "-Wall", "-Wextra", "-Wpedantic", "-Wshadow", "-Wformat=2", "-Wcast-align", "-Wconversion", "-Wsign-conversion", "-Wnull-dereference" ], "C_Cpp_Runner.msvcWarnings": [ "/W4", "/permissive-", "/w14242", "/w14287", "/w14296", "/w14311", "/w14826", "/w44062", "/w44242", "/w14905", "/w14906", "/w14263", "/w44265", "/w14928" ], "C_Cpp_Runner.enableWarnings": true, "C_Cpp_Runner.warningsAsError": false, "C_Cpp_Runner.compilerArgs": [], "C_Cpp_Runner.linkerArgs": [], "C_Cpp_Runner.includePaths": [], "C_Cpp_Runner.includeSearch": [ "*", "**/*" ], "C_Cpp_Runner.excludeSearch": [ "**/build", "**/build/**", "**/.*", "**/.*/**", "**/.vscode", "**/.vscode/**" ], "C_Cpp_Runner.useAddressSanitizer": false, "C_Cpp_Runner.useUndefinedSanitizer": false, "C_Cpp_Runner.useLeakSanitizer": false, "C_Cpp_Runner.showCompilationTime": false, "C_Cpp_Runner.useLinkTimeOptimization": false, "C_Cpp_Runner.msvcSecureNoWarnings": false, "clang.executable": "D:/Program Files/LLVM/bin/clang.exe", "clangd.path": "D:/Program Files/LLVM/bin/clangd.exe", "clangd.arguments": [ "--background-index", "--header-insertion=never", "--limit-results=500", "--suggest-missing-includes", "--pch-storage=memory", "--clang-tidy=false" ], "files.exclude": { "**/.git/**": true, "**/.vscode/**": true, "**/build/**": true, "**/out/**": true, "**/prebuild/**": true, "**/tools/**": true }, "search.exclude": { "**/.git/**": true, "**/.vscode/**": true, "**/build/**": true, "**/out/**": true, "**/prebuild/**": true, "**/tools/**": true } }

目前看,通过LLVM/clangd方式更好,跳转速度更快

I:\TBOX\222\.vscode\c_cpp_properties.json文件中的内容都是一样的

{ "configurations": [ { "name": "windows-gcc-x64", "includePath": [ "${workspaceFolder}/**" ], "compilerPath": "D:/MinGW1.19.0/MinGW/bin/gcc.exe", "cStandard": "${default}", "cppStandard": "${default}", "intelliSenseMode": "windows-gcc-x64", "compilerArgs": [ "" ] } ], "version": 4 }
版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/2/26 12:18:17

接口自动化测试框架深度优化:让你的用例执行速度飞起来

在持续集成与敏捷开发日益普及的今天,接口自动化测试已成为软件质量保障的核心环节。随着业务复杂度的提升,测试用例数量呈现指数级增长,执行效率直接关系到反馈周期和交付节奏。本文将深入探讨接口自动化测试框架的深度优化策略,…

作者头像 李华
网站建设 2026/2/28 14:53:52

模拟ic 集成电路 蓝牙 BlueCoreTM3-Flash is a single chip...

模拟ic 集成电路 蓝牙 BlueCoreTM3-Flash is a single chip radio and baseband IC for Bluetooth 2.4GHz systems. BlueCore3-Audio Flash contains 6M bit of internal Flash memory. When used with the CSR Bluetooth cds电路800多页超值分析报告 仅供参考学习十年…

作者头像 李华
网站建设 2026/2/27 15:05:05

SpringBoot 学习心得

在计算机应用技术专业的学习历程中,SpringBoot 框架的学习是一次从 “繁琐配置” 到 “高效开发” 的蜕变之旅。作为一名志在专升本、深耕软件开发领域的学习者,SpringBoot 带来的不仅是技术层面的提升,更是对企业级应用开发思维的重塑。初识…

作者头像 李华
网站建设 2026/2/28 8:37:40

案例分享 | 文物遗址周边环境风貌规划与设计虚拟仿真实验

背景与痛点青龙寺是隋大兴唐长安城在“象天法地”“天人合一”等理念指导下,建设在“九五高地”上的寺院;是当今西安“城市双修”、擦亮“金色名片”、活化历史文化遗产的重点区域。历史文化名城等文化遗产出现违法和不协调建设的主要原因就在建设控制地…

作者头像 李华
网站建设 2026/2/28 14:29:49

ImageKnife性能优化实战指南:OpenHarmony图片加载的完整解决方案

作为OpenHarmony开发者,你是否曾经为应用中的图片加载性能问题而烦恼?图片加载缓慢、内存占用过高、列表滑动卡顿,这些问题都直接影响用户体验。今天,我将为你带来ImageKnife图片加载库的终极优化指南,帮助你从性能瓶颈…

作者头像 李华
网站建设 2026/2/28 11:24:10

JeeLowCode新手必看:5分钟快速上手企业级低代码开发框架

JeeLowCode新手必看:5分钟快速上手企业级低代码开发框架 【免费下载链接】jeelowcode 🔥JeeLowCode 【企业级低代码】 是一款专为企业打造的低代码开发框架《免费商用》,以低代码为核心,实现快速开发。提供可视化界面,…

作者头像 李华