Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.117.0
- OS Version: macOS Tahoe v26.3.1
When VSCode is opened in a workspace/folder inside a repository, the VSCode file watcher watches folders outside of the workspace and does not respect relative paths in the files.watcherExclude setting. It seems like something is watching the repository at its root. I'm connected to a remote machine using the Remote - SSH extension.
Steps to Reproduce:
- Clone this toy repo: https://github.com/kliang-stripe/repro-file-watch.
- Open the repo in VSCode with folder
A/ as the workspace.
- Find the PID of the VSCode file watcher.
- Find the files that the file watcher is watching. To do this, I cloned https://github.com/mikesart/inotify-info, ran
make, and followed https://github.com/mikesart/inotify-info#run-with-specific-pids (_release/inotify-info {PID}) to get the files that were being watched.
- Notice that folders
B/, C/, and A/to-ignore are being watched. This is buggy because only A/ is opened in VSCode and in A/.vscode/settings.json, we exclude A/to-ignore from file watching.
- In
A/.vscode/settings.json, uncomment the rest of the files in the files.watcherExclude setting.
- Close and re-open VSCode with folder
A/ as the workspace.
- Repeat steps 3-4.
- Notice that folders
B/, C/, and A/to-ignore are no longer being watched.
Does this issue occur when all extensions are disabled?: Yes
When VSCode is opened in a workspace/folder inside a repository, the VSCode file watcher watches folders outside of the workspace and does not respect relative paths in the
files.watcherExcludesetting. It seems like something is watching the repository at its root. I'm connected to a remote machine using the Remote - SSH extension.Steps to Reproduce:
A/as the workspace.make, and followed https://github.com/mikesart/inotify-info#run-with-specific-pids (_release/inotify-info {PID}) to get the files that were being watched.B/,C/, andA/to-ignoreare being watched. This is buggy because onlyA/is opened in VSCode and inA/.vscode/settings.json, we excludeA/to-ignorefrom file watching.A/.vscode/settings.json, uncomment the rest of the files in thefiles.watcherExcludesetting.A/as the workspace.B/,C/, andA/to-ignoreare no longer being watched.