首页 >开发工具 >VSCode >vscode中ctrl+鼠标左键不能跳转

vscode中ctrl+鼠标左键不能跳转

王林
王林原创
2020-04-04 14:42:3017705浏览

vscode中ctrl+鼠标左键不能跳转

问题:

使用CTRL+鼠标左键无法跳转到定义。

解决方法:

1、打开VsCode: 文件 -> 将工作区另存为,,将文件夹添加到工作区

2、按快捷键Ctrl+P,之后点击Edit configurations,打开c_cpp_properties.json文件,检查 "includePath" 字段。。

如:

{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**",
                "C:/Keil_v5/ARM/ARMCC/include"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "compilerPath": "C:\\\\Program Files\\\\LLVM\\\\bin\\\\clang.exe",
            "cStandard": "c11",
            "cppStandard": "c++17",
            "intelliSenseMode": "clang-x64"
        }
    ],
    "version": 4
}

我这边如果添加了其它路径 "C:/Keil_v5/ARM/ARMCC/include" 就会造成无法跳转,最后只能改成:

{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "compilerPath": "C:\\\\Program Files\\\\LLVM\\\\bin\\\\clang.exe",
            "cStandard": "c11",
            "cppStandard": "c++17",
            "intelliSenseMode": "clang-x64"
        }
    ],
    "version": 4
}

相关教程推荐:vscode教程

以上是vscode中ctrl+鼠标左键不能跳转的详细内容。更多信息请关注PHP中文网其他相关文章!

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn