問題:
使用CTRL+鼠標(biāo)左鍵無法跳轉(zhuǎn)到定義。
解決方法:
1、打開vscode: 文件 -> 將工作區(qū)另存為,,將文件夾添加到工作區(qū)
2、按快捷鍵Ctrl+P,之后點(diǎn)擊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” 就會(huì)造成無法跳轉(zhuǎn),最后只能改成:
{ ????"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 }
相關(guān)教程推薦:vscode教程
? 版權(quán)聲明
文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載。
THE END
喜歡就支持一下吧
相關(guān)推薦