Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vscode: 如何在 VS Code 查看 "某个文件或变量" 被引用的地方 #8

Open
tgx1587900660 opened this issue Dec 30, 2024 · 0 comments

Comments

@tgx1587900660
Copy link
Owner

1. 背景

我在重构代码时,想删除某个文件或变量,但是我不知道它被引用的地方。为了避免误删,需要找出引用它们的文件。如图,我想找到 addTagsDrawer.vue 这个组件被哪些文件引用了:

image

2. 解决方法

安装插件 Reference Search View

image

安装完成后,选中一个引用该组件(addTagsDrawer.vue)的地方,并右键后点击 find all reference

image

即可看到所有引用它的地方:

image

查找变量引用也是一样的方法

@tgx1587900660 tgx1587900660 changed the title vscode: 如何在 VS Code 查看 "某个文件或变量" 被引用的地方(避免误删) vscode: 如何在 VS Code 查看 "某个文件或变量" 被引用的地方 Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant