You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to limit virtualenv file watches to prevent large workspace error #19622
Originally posted by ggydush-fn July 21, 2022
I have all of my virtual environments in a single folder (~/.virtualenvs/) and found that this causes the following issue in Vscode (even in an empty project):
Unable to watch for file changes in this large workspace folder. Please follow the instructions link to resolve this issue.
The logs show that the Python extension is watching the ~/.virtualenvs directory, but does it need to watch all files in these directories? When working on multiple projects, this can easily exceed the watcher limit (which I don't have much control over setting, as I'm operating on a remote machine).
Disabling the Python extension resolves, but am wondering if anyone else has come across this and knows a way around it? I've tried modifying Vscode's setting "files.watcherExclude" but that did not seem to have an effect.
As to what the extension can do, try a couple of things:
Do you have poetry environments? I think that's the only global watching extension does is that.
Try disabling Pylance extension which also does some watching. Set python.languageServer to Jedi.
Lastly, please provide the logs as mentioned in the issue template. Set python.logging.level to debug in User settings, reload window, then perform the steps to reproduce before providing the logs.
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
XXX
It contains information as to what and why we watch certain directories.
Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on then we will be happy to re-open this issue to pick up where we left off.
Activity
karrtikr commentedon Aug 4, 2022
Related: microsoft/vscode#151827
karrtikr commentedon Aug 12, 2022
ggydush-fn Ideally the setting should help, I suggest to open a bug in https://github.com/microsoft/vscode/issues, it's possibly the same as microsoft/vscode#151827.
As to what the extension can do, try a couple of things:
python.languageServertoJedi.Lastly, please provide the logs as mentioned in the issue template. Set
python.logging.leveltodebugin User settings, reload window, then perform the steps to reproduce before providing the logs.Output for
Pythonin theOutputpanel (View→Output, change the drop-down the upper-right of theOutputpanel toPython)It contains information as to what and why we watch certain directories.
brettcannon commentedon Sep 29, 2022
Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on then we will be happy to re-open this issue to pick up where we left off.