VSC 无法在这个奇怪的大工作区中监视文件更改 [英] VSC unable to watch for file changes in this large workspace weird
问题描述
我刚开始使用 VSCode 1.24.1 版.
I just started using VSCode version 1.24.1.
加载文件夹后,显示警告
After loading a folder, it shows warning
Visual Studio Code 无法观察这个大工作区中的文件变化
Visual Studio Code is unable to watch for file changes in this large workspace
在我按照他们的指南,使用
cat /proc/sys/fs/inotify/max_user_watches
我得到 8192,而我的项目只有 650 个文件(其中 400 个在 .git 中)
I get 8192, while my project has only 650 files (of which 400 are inside .git)
为什么会这样?这是一个错误还是我遗漏了什么?
Why does this happen? Is this a bug or am I missing something?
(增加限制显然不是正确的解决方案.)
(Increasing the limit is clearly not the right solution.)
推荐答案
你不在手表中的事实并不意味着它的 VSCode
的错.
The fact that you are out of watches does not mean that its VSCode
's fault.
VSCode
在从 watch(在 linux 上)中排除目录时肯定会出现问题.
VSCode
has for sure issues with excluding directories from watch (on linux).
但是由于您自己计算了文件数,因此这种情况下的错误消息可能具有误导性,并且其他一些应用程序已经耗尽了手表.
But since you have counted the files yourself, the error message in this case is probably misleading and some other application has already exhausted watches.
要追踪有罪的应用程序,您可以使用这个不错的脚本
To trace the guilty app you can use this nice script
这篇关于VSC 无法在这个奇怪的大工作区中监视文件更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!