news 2026/4/23 12:44:12

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/4/23 9:44:26

企业AI智能体的技术架构与实施路径:从概念到落地的关键技术实践

一、企业AI智能体的技术架构解析企业级AI智能体并非单一技术模块,而是由多层级架构协同构成的复杂系统。典型的技术架构可分为感知层、认知层、决策层与执行层,其核心能力取决于各层的技术耦合度与扩展性。1. 感知层:多模态交互入口输入模块&…

作者头像 李华
网站建设 2026/4/23 9:44:22

5分钟掌握分布式PPO:7倍加速强化学习训练终极方案

你是否正在为PPO算法训练耗时过长而苦恼?传统单环境训练模式下,一个简单的CartPole任务可能需要数小时才能收敛。本文将从性能瓶颈深度剖析入手,为你呈现一套完整的分布式训练架构设计方案,通过多进程环境并行技术实现PPO算法7倍性…

作者头像 李华
网站建设 2026/4/23 9:44:29

智能运维的“地基革命”:数据治理如何支撑大模型智能体?

岁末回望智能运维领域,大模型智能体正重塑运维格局,智能运维建设从基于小模型统计分析算法的1.0时代进入基于大、小模型融合智能体驱动的2.0时代。热潮之下,擎创科技始终保持清醒洞察:行业存在一个易被忽视的核心迷思—不少企业过…

作者头像 李华
网站建设 2026/4/23 11:12:31

2026印度食品饮料展 | Indus Food

展会时间:2026.1.8-10印度新德里 印度世博中心亚洲顶级食品饮料B2B盛会,通往南亚市场的核心门户。【关键数据】 ✅ 1800 展商 ✅ 100 国家买家 ✅ 7500 专业观众 ✅ 100 连锁超市到场【为何参展?】直面印度5000亿级食品市场对接全产业链…

作者头像 李华
网站建设 2026/4/23 10:12:26

深入理解C/C++指针

1.指针理解 首先我们看一段程序&#xff0c;如下&#xff1a; #include <stdio.h>int main(void) {char ch;char* pc &ch;*pc H;printf("%c", ch);return 0; } 我们可以看到这是指针最基本的用法&#xff0c;那么我们现在来深入理解一下这段程序&#x…

作者头像 李华