vscode中ctrl+鼠標左鍵不能跳轉

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教程

以上就是

? 版權聲明
THE END
喜歡就支持一下吧
點贊15 分享