GNU global visual studio code (vscode) C/C++ find all reference

visual studio code c/c++ find all reference功能一直沒上
open source 專案相關feature不斷delay
call hierachy目前預計9月會上
https://github.com/Microsoft/vscode-cpptools/issues/16
上之前會先把find all reference完成
本來預計6月milestone要上
目前又延後到七月
https://github.com/microsoft/vscode-cpptools/issues/15
之前主要用cquery
cquery能力蠻強的
但是它運作時還蠻容易拖慢整個系統速度
而且他產出的json檔案超級大
所以最近改用gtags來達到類似功能

gnu global binary
https://www.gnu.org/software/global/

download
http://adoxa.altervista.org/global/

下載最新版GLOBAL 6.6.3 binary
並解壓縮到你要的路徑

下載vscode的套件 C/C++ GNU Global

將解壓縮後的程式路徑設定好
"gnuGlobal.globalExecutable": "D:\\codelib\\glo663wb\\bin\\global.exe",
"gnuGlobal.gtagsExecutable": "D:\\codelib\\glo663wb\\bin\\gtags.exe",
"gnuGlobal.encoding": "Big5",


使用前需要先build tags
ctrl+shift+p


如果發現如果build tags失敗
有可能你的vscode權限不足
再重新使用系統管理員權限來開vscode

然後再來只要右鍵或者利用快速鍵
就可以找到所有call這個function的reference


留言

熱門文章