news 2026/3/6 11:36:57

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/28 16:22:04

JavaWeb

文章目录1.Http1.1常用的HTTP方法1.2注意事项1.3Https1.4Http消息结构1.4.1请求消息1.4.2响应消息1.4.3例子1.5常见状态码1.6.Http content-type1.7.MIME类型2.Web服务器3.XML3.1文档声明3.2元素3.3.属性3.4注释3.5特殊字符转义3.6 Dom4j 解析 XML1.Http Http,被称为…

作者头像 李华
网站建设 2026/3/5 14:01:39

SEM + GEO优化系统:付费推广与区域定位双引擎,驱动精准获客与ROI提升

在数字营销竞争日益激烈的今天,如何让每一分广告预算都花在刀刃上?答案在于SEM与GEO系统的深度结合——通过付费推广的精准投放与区域定位的智能匹配,实现营销效果的最大化。一、为什么SEM需要结合GEO定位?传统SEM投放往往面临两大…

作者头像 李华
网站建设 2026/3/3 21:32:47

告别局域网束缚,FastSend+cpolar 让文件传输自由起来

文章目录前言【视频教程】1.关于FastSend2.Docker部署3.简单使用FastSend4.安装cpolar内网穿透5. 配置公网地址6. 配置固定公网地址总结FastSend 与 cpolar 的结合,扩展了文件传输的使用场景,让跨网络共享变得简单高效,适合需要频繁交换大文件…

作者头像 李华
网站建设 2026/3/1 1:56:07

AI如何自动生成内网通积分系统?5步实现智能管理

快速体验 打开 InsCode(快马)平台 https://www.inscode.net输入框内输入如下内容: 开发一个企业内网积分管理系统,包含以下功能:1.员工积分账户管理 2.积分发放/扣除规则配置 3.积分兑换商城 4.积分排行榜 5.数据可视化报表。使用React前端N…

作者头像 李华