microsoft / microsoft/vscode-dotnettools
[BUG] Unable to watch for changes in this large workspace folder
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 321
- Forks
- 54
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 2
Description
BLOCKED on https://github.com/dotnet/razor/issues/9370
Describe the Issue
When opening a large project (in my specific case a Unity project) I get this error:
Unable to watch for file changes in this large workspace folder. Please follow the instructions link to resolve this issue.
This tool can be used to gather information regarding which files are being listened to:
https://github.com/mikesart/inotify-info
When running ./inotify-info, it shows the offending extensions:
------------------------------------------------------------------------------
INotify Limits:
max_queued_events 16384
max_user_instances 128
max_user_watches 524288
------------------------------------------------------------------------------
Pid Uid App Watches Instances
46652 1000 Microsoft.VisualStudio.Code.ServiceHost 356368 17
46043 1000 rzls 133820 4
46390 1000 Microsoft.VisualStudio.Code.Server 33457 3
3214 1000 tracker-miner-fs-3 178 1
3051 1000 systemd 152 3
45999 1000 code 46 1
A few interesting things to note:
- Microsoft.VisualStudio.Code.ServiceHost is watching A LOT of files
- I am in a Unity project, not a razor project. I have no idea why rzls has started up.
- My
files.watcherExcludesetting in VS Code is not being respected.
My files.watcherExclude is currently set to:
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/node_modules/*/**": true,
"**/.hg/store/**": true,
"**/.DS_Store":true,
"**/.git/**":true,
"**/.gitmodules":true,
"**/*.booproj":true,
"**/*.pidb":true,
"**/*.suo":true,
"**/*.user":true,
"**/*.userprefs":true,
"**/*.unityproj":true,
"**/*.dll":true,
"**/*.exe":true,
"**/*.pdf":true,
"**/*.mid":true,
"**/*.midi":true,
"**/*.wav":true,
"**/*.gif":true,
"**/*.ico":true,
"**/*.jpg":true,
"**/*.jpeg":true,
"**/*.png":true,
"**/*.psd":true,
"**/*.tga":true,
"**/*.tif":true,
"**/*.tiff":true,
"**/*.3ds":true,
"**/*.3DS":true,
"**/*.fbx":true,
"**/*.FBX":true,
"**/*.lxo":true,
"**/*.LXO":true,
"**/*.ma":true,
"**/*.MA":true,
"**/*.obj":true,
"**/*.OBJ":true,
"**/*.cubemap":true,
"**/*.flare":true,
"**/*.mat":true,
"**/*.meta":true,
"**/*.unity":true,
"**/*.prefab":true,
"**/*.asmdef":true,
"build/":true,
"Build/":true,
"Library/":true,
"library/":true,
"obj/":true,
"Obj/":true,
"temp/":true,
"Temp/":true,
"**/Gitignore/**":true,
"**/builds/**":true
}
When running ./inotify-info Microsoft.VisualStudio.Code.ServiceHost we can see the specific files it is listening to which includes many that are supposed to be excluded such as:
58486303 [259:6] /home/tcroc/dev/BlockyBall/.git/lfs/objects/d5/63/
58486304 [259:6] /home/tcroc/dev/BlockyBall/.git/lfs/objects/d7/8c/
58486305 [259:6] /home/tcroc/dev/BlockyBall/.git/lfs/objects/84/eb/
58486306 [259:6] /home/tcroc/dev/BlockyBall/.git/lfs/objects/2a/8e/
58486307 [259:6] /home/tcroc/dev/BlockyBall/.git/lfs/objects/dc/bc/
Steps To Reproduce
- Create a Unity Project (or probably any kind of project)
- Initialize a git repo in the project.
- Set the vs code setting
files.watcherExcludeto exclude some files and directories. - See that is not being respected and instead A LOT of files are being listened to.
Expected Behavior
The files and directories in files.watcherExclude should not be listened to.
Environment Information
- OS: Linux
- VS Code Version: 1.81.0
- Extension: C# Dev Kit 0.3.21
- Extension: C# 2.0.328
- Extension: Unity 0.9.0
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the linked blocking issue dotnet/razor#9370 first, then reproduce the Unity workspace steps on Linux with the listed VS Code extensions and files.watcherExclude settings. Run inotify-info and compare the watched paths with the configured exclusions. Done means excluded files and directories are no longer watched and the large-workspace warning is resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, linux, unity, vscode
- Domain
- devtools, operating-systems, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100