VS Code Unable to Watch for File Changes (ENOSPC)
Quick answer
On Linux, raise fs.inotify.max_user_watches to 524288 and exclude large folders in files.watcherExclude.
Most likely fix: Exclude big folders
How to fix it
Try these in order — the most common fix is first.
1. Exclude big folders
- Add **/node_modules/*/**, **/.git/objects/** and **/.venv/** to files.watcherExclude
Did this fix it?2. Check the current limit
- Run cat /proc/sys/fs/inotify/max_user_watches
Did this fix it?3. Raise the limit
- Add fs.inotify.max_user_watches=524288 to /etc/sysctl.conf (or a file in /etc/sysctl.d/ on Arch and Ubuntu 24.10+)
- Run sudo sysctl --system
- Each watch uses about 1,080 bytes; use a lower value on low-memory systems
Did this fix it?
Symptoms
A notification says 'Visual Studio Code is unable to watch for file changes in this large workspace' (ENOSPC).
Why it happens
- Low inotify watch limit on Linux
- Huge folders such as node_modules or .venv being watched
- Other apps using watches
This guide also covers
- vscode unable to watch for file changes
- enospc vscode
- inotify max_user_watches vscode
Still not working?
If VS Code keeps failing, you're not alone. See every VS Code problem users report or the alternatives people switch to.
Need a custom web app or internal tool? Our small team builds it, on your domain or hosted by us. Price agreed together.
Get a quote