VS Code Unable to Watch for File Changes (ENOSPC)

Share
Fixed in latest version Linux Updated November 13, 2026Based on 2 user reportsHow we research

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. 1. Exclude big folders

    1. Add **/node_modules/*/**, **/.git/objects/** and **/.venv/** to files.watcherExclude
    Did this fix it?
  2. 2. Check the current limit

    1. Run cat /proc/sys/fs/inotify/max_user_watches
    Did this fix it?
  3. 3. Raise the limit

    1. Add fs.inotify.max_user_watches=524288 to /etc/sysctl.conf (or a file in /etc/sysctl.d/ on Arch and Ubuntu 24.10+)
    2. Run sudo sysctl --system
    3. 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
Fixed it? Share this guide

Other VS Code errors

All 12 VS Code errors and fixes →