Solve the problem that vscode C++ code finds all references "Find all reference" slowly

overview

When using vscode to write C++ code and right-click "Find all reference", I found that the response was extremely slow and very inaccurate. A workaround is to use gtags for the global component.

step

  • Install the gtag plugin in VSCode (installing the C/C++ GNU global plugin may be useful, but I haven't tried it)
    insert image description here

  • Install global in ubuntu environment, installation method:sudo apt install global

  • In the windows environment, go here to download the windows version of global, and configure the environment variables
    insert image description here

  • In the source code root directory rungtags .

  • At this point "Find all reference" works fine.

Further reading: VSCode correctly supports "Find all reference"

Guess you like

Origin blog.csdn.net/stallion5632/article/details/129401119