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
}
相关推荐
mailangduoduo1 小时前
零基础教学连接远程服务器部署项目——VScode版本
服务器·pytorch·vscode·深度学习·ssh·gpu算力
浔川python社2 小时前
浔川代码编辑器 v5.0 上线时间公布
编辑器
山峰哥12 小时前
数据库工程与SQL调优——从索引策略到查询优化的深度实践
数据库·sql·性能优化·编辑器
Doro再努力12 小时前
Vim 快速上手实操手册:从入门到生产环境实战
linux·编辑器·vim
Doro再努力12 小时前
【Linux操作系统10】Makefile深度解析:从依赖推导到有效编译
android·linux·运维·服务器·编辑器·vim
kun2003102916 小时前
如何用Obsidian+VSCode生成文案排版并发布到公众号
ide·vscode·编辑器
徐小夕@趣谈前端21 小时前
拒绝重复造轮子?我们偏偏花365天,用Vue3写了款AI协同的Word编辑器
人工智能·编辑器·word
风一样的航哥21 小时前
标题:从卡顿到流畅:深度剖析 Word 2013 与 Word 2021 处理高清图片文档的性能鸿沟
编辑器
冬奇Lab1 天前
一天一个开源项目(第14篇):CC Workflow Studio - 可视化AI工作流编辑器,让AI自动化更简单
人工智能·开源·编辑器
暴走十八步1 天前
PHP+vscode开启调试debug
开发语言·vscode·php