Does anyone here use Visual Studio Code and rememb...
# general
m
Does anyone here use Visual Studio Code and remember which setting prevents the runaway cpu use? I remembered a bug it used to have when opening the osquery directory whereby it would peg one cpu core forever at 100% doing some C++ symbols analysis (
cpptools
extension). Seems like it still does that, but I forget what the solution was. I thought it was disabling “follow symlinks” but that apparently wasn’t it. I also tried adding an analysis exclude for the
libraries
subdirectory but wasn’t successful.
s
I have that one,
Search: Follow Symlinks
to disabled, but also
Files: Watcher Exclude
skipping
**/libraries/cmake/source**
and the build folder. I know it's not related to C++, but if you have the python extension installed you want to check that too. I was using a pyright configuration file in the root of the source folder, but I seem to recall something changed "recently" and it might not work anymore, but have not further investigated (at least, I was having issues on macOS even with that in place; I just ended up disabling the extension for the project since I didn't need it for now). For pyright, create a
pyrightconfig.json
in the root with:
Copy code
{
  "exclude": [**/libraries/**]
}
🙌 1
But yeah in general the issue is that some libs contain symlink loops, so you want to skip them or ignore the folders outright
m
Ok, I finally got it to ignore things, with the following
settings.json
Copy code
"search.followSymlinks": false,
    "files.watcherExclude": {
        "**/libraries/cmake/source/**": true
    },
    "C_Cpp.codeAnalysis.exclude": {
        "**/libraries/cmake/source/**": true
    }
And then I also had to
cmd-shift-p
to open the command search, and search/click `Reset intellisense`and quit/restart VS Code like twice, but it finally stopped indexing the submodules. 😅