Replies: 1 comment
-
Here’s a practical way to track down why that outside folder is being indexed and how to stop it. How to see where the path comes from
Ways to prevent that root from being indexedOption A — Exclude it explicitly (quickest): add to your workspace settings:
Option B — Pin
Option C — If you use CMake Tools as a provider:
In your CMake, replace broad:
with target-scoped:
Option D — Tame recursive includes (newer setting):
Clean up & verify
If this helped, please consider marking the answer as Accepted so others can find it faster. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The problem I have with IntelliSense is that for a large software project it uses extreme amounts of memory after a while, until the whole computer becomes unresponsive. The only solution is to kill the problematic
cpptools.exe
processes.The problem probably is caused by the fact that IntelliSense decides to index all the files under a common root directory. There are lots of source directories in different Git repositories. But in the collection of folders that I have opened in a specific VS Code workspace this common root directory is not opened as a folder. Only several selected sub-folders of the common root directory are in the workspace.
How can I find out why IntelliSense decides to include the problematic common root folder in the "Processing folder (recursive):" list in the C/C++ debug output? It is possible that there's a bug that this directory is referenced unintentionally from one of our CMakeLists.txt files for example, but we were not able to locate this yet. I have checked for example the
compile_commands.json
file, and there the problematic directory is not listed as an include path.Beta Was this translation helpful? Give feedback.
All reactions