news 2026/6/10 6:21:27

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/6/9 17:58:47

WebRTC实时通信原理与P2P连接实战

本文深入剖析WebRTC的核心架构、ICE连接建立流程,并通过实战代码演示如何搭建一个点对点视频通话应用。前言 打开浏览器,无需安装任何插件,就能进行视频通话——这在十年前是难以想象的。 WebRTC(Web Real-Time Communication&…

作者头像 李华
网站建设 2026/6/10 16:49:50

微型导轨的类型性能差异与场景适配需求

作为机械系统的关键传动配件,微型导轨的性能直接决定了设备的精度与寿命。从半导体检测设备的纳米级定位到工业机器人的高负载运转,滚珠型、滚柱型、交叉滚子型三大主流导轨在结构设计、摩擦特性与承载能力上的差异,正重塑着不同场景的技术选…

作者头像 李华
网站建设 2026/6/9 17:26:20

开源leaphand装配及相关调试

仿真仓库 真机API仓库 需要购买的重要物料 名称数量XC330-M288-T16DYNAMIXEL FPX330-H10111DYNAMIXEL FPX330-S10110DYNAMIXEL FPX330-S1026DYNAMIXEL U2D21DYNAMIXEL Power Hub1 还要备好一些官方BOM表里面的螺丝螺母和3D打印件等 第一步:验证电机与配置 在把…

作者头像 李华
网站建设 2026/6/10 11:09:49

【MCP MS-720认证必看】:Teams Agent开发核心技能全解析

第一章:MCP MS-720认证与Teams Agent开发概述Microsoft Certified Professional (MCP) MS-720 认证专注于 Teams 语音和协作解决方案的设计与实施,是面向现代工作场所通信架构的关键资质。该认证验证了开发者和管理员在配置 Teams 电话系统、管理紧急呼叫…

作者头像 李华
网站建设 2026/6/10 11:11:12

远程debug服务器代码

前言 相信有不少Javaer的代码在本地跑没一点问题,但是部署到服务器上就会出翔莫名其妙的bug,为了看bug的原因只能通过日志的形式来实现,下边为各位Javaer提供另一种方法,通过IDEA的功能能够直接debug服务器上的代码,话…

作者头像 李华