microsoft / microsoft/vscode-cpptools
How do I fix this problem: "Unable to start the C/C++ language server. IntelliSense features will be disabled. Error: Error: EPERM: operation not permitted, scandir "
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Environment
- OS and Version: Windows 11 Pro [Version 10.0.22631.2715]
- VS Code Version: 1.84
- C/C++ Extension Version: 1.18.5
- Local machine
- Use NTFS file system
Bug Summary and Steps to Reproduce
Bug Summary: I can't start C/C++ language server when I update extension C/C++.
Steps to reproduce:
- Go to 'Extensions'
- Update extension
C/C++.
Notes: I can use C/C++ language server before updating. The version was 1.16.3 before. - Reload VS Code.
- See error:
Unable to start the C/C++ language server. IntelliSense features will be disabled. Error: Error: EPERM: operation not permitted, scandir 'f:/System Volume Information'
Just Like:
Expected behavior: I hope to solve this problem/bug. I tried on other machines but the same problem arose.
Configuration and Logs
c_cpp_properties.json:
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**",
"D:\\Program Files\\Microsoft Visual Studio\\IDE\\VC\\Tools\\MSVC\\**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "10.0.22000.0",
"compilerPath": "D:/Program Files/Microsoft Visual Studio/IDE/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe",
"cStandard": "c17",
"cppStandard": "c++14",
"intelliSenseMode": "windows-msvc-x64"
},
{
"name": "c++",
"includePath": [
"${workspaceFolder}/**",
"D:/Program Files/GCC/mingw32/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "10.0.22000.0",
"compilerPath": "D:/Program Files/GCC/mingw32/bin/c++.exe",
"cStandard": "c17",
"cppStandard": "c++14",
"intelliSenseMode": "windows-gcc-x64"
},
{
"name": "g++",
"includePath": [
"${workspaceFolder}/**",
"D:/Program Files/Dev-Cpp/MinGW32/**",
"D:/Program Files/Dev-Cpp/MinGW32/include"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "10.0.22000.0",
"compilerPath": "D:/Program Files/GCC/mingw32/bin/g++.exe",
"cStandard": "c17",
"cppStandard": "c++14",
"intelliSenseMode": "windows-gcc-x64"
},
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**",
"/usr**"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "linux-gcc-x64"
}
],
"version": 4
}
the language server logging:
loggingLevel: Debug
LSP: (received) cpptools/initialize (id: 1)
LSP: (invoked) cpptools/initialize (id: 1)
cpptools version (TypeScript): 1.18.5
cpptools version (native): 1.18.3.0
Autocomplete is enabled.
Error squiggles are enabled.
Hover is enabled.
IntelliSense Engine = default.
LSP: Message ignored due to no registered handler: $/setTrace
LSP: (received) cpptools/queryCompilerDefaults (id: 2)
LSP: (invoked) cpptools/queryCompilerDefaults (id: 2)
LSP: (received - deferred) textDocument/didOpen: file:///f%3A/C%2B%2B/Code/C%2B%2B-GUI/Win32%20APP/Controls/main.cpp
Querying compiler for default C++ language standard using command line: "D:/Program Files/GCC/mingw32/bin/g++.exe" -x c++ -E -dM nul
LSP: (received) cpptools/didChangeSettings
LSP: (received) cpptools/didChangeSettings
LSP: (received - deferred) cpptools/activeDocumentChange: file:///f%3A/C%2B%2B/Code/C%2B%2B-GUI/Win32%20APP/Controls/main.cpp
LSP: (received - deferred) cpptools/textEditorSelectionChange
LSP: (received - deferred) cpptools/getCodeActions: file:///f%3A/C%2B%2B/Code/C%2B%2B-GUI/Win32%20APP/Controls/main.cpp (id: 3)
Detected language standard version: gnu++14
Querying compiler's default target using command line: "D:/Program Files/GCC/mingw32/bin/g++.exe" -dumpmachine
Compiler returned default target value: i686-w64-mingw32
Compiler query command line: "D:/Program Files/GCC/mingw32/bin/g++.exe" -std=c17 -m32 -Wp,-v -E -dM -x c nul
LSP: $/cancelRequest (cpptools/getCodeActions, id: 3)
LSP: (received - deferred) cpptools/getCodeActions: file:///f%3A/C%2B%2B/Code/C%2B%2B-GUI/Win32%20APP/Controls/main.cpp (id: 4)
LSP: $/cancelRequest (cpptools/getCodeActions, id: 4)
LSP: (received - deferred) cpptools/getCodeActions: file:///f%3A/C%2B%2B/Code/C%2B%2B-GUI/Win32%20APP/Controls/main.cpp (id: 5)
LSP: $/cancelRequest (cpptools/getCodeActions, id: 5)
LSP: (received - deferred) cpptools/getCodeActions: file:///f%3A/C%2B%2B/Code/C%2B%2B-GUI/Win32%20APP/Controls/main.cpp (id: 6)
Attempting to get defaults from C compiler in "compilerPath" property: 'D:/Program Files/GCC/mingw32/bin/g++.exe'
Compiler query command line: "D:/Program Files/GCC/mingw32/bin/g++.exe" -std=gnu++14 -m32 -Wp,-v -E -dM -x c++ nul
Attempting to get defaults from C++ compiler in "compilerPath" property: 'D:/Program Files/GCC/mingw32/bin/g++.exe'
LSP: (invoked) cpptools/didChangeSettings
Autocomplete is enabled.
Error squiggles are enabled.
Hover is enabled.
IntelliSense Engine = default.
Enhanced Colorization is enabled.
LSP: (invoked) cpptools/didChangeSettings
Autocomplete is enabled.
Error squiggles are enabled.
Hover is enabled.
IntelliSense Engine = default.
Enhanced Colorization is enabled.
LSP: Message ignored due to no registered handler: $/setTrace
LSP: (received) cpptools/didChangeSettings
LSP: (invoked) cpptools/didChangeSettings
Autocomplete is enabled.
Error squiggles are enabled.
Hover is enabled.
IntelliSense Engine = default.
Enhanced Colorization is enabled.
LSP: Message ignored due to no registered handler: $/setTrace
LSP: (received) cpptools/didChangeSettings
LSP: (invoked) cpptools/didChangeSettings
Autocomplete is enabled.
Error squiggles are enabled.
Hover is enabled.
IntelliSense Engine = default.
Enhanced Colorization is enabled.
LSP: $/cancelRequest (cpptools/getCodeActions, id: 6)
LSP: (received - deferred) cpptools/getCodeActions: file:///f%3A/C%2B%2B/Code/C%2B%2B-GUI/Win32%20APP/Controls/main.cpp (id: 7)
LSP: $/cancelRequest (cpptools/getCodeActions, id: 7)
LSP: (received - deferred) cpptools/getCodeActions: file:///f%3A/C%2B%2B/Code/C%2B%2B-GUI/Win32%20APP/Controls/main.cpp (id: 8)
LSP: (received - deferred) cpptools/activeDocumentChange: file:///f%3A/C%2B%2B/Code/C%2B%2B-GUI/Win32%20APP/Controls/main.cpp
LSP: (received - deferred) cpptools/textEditorSelectionChange
Other Extensions
You can see what extensions I installed in the image below.
I tried to disable other extensions except C/C++, C/C++ Extension Pack, but the problem still arose.
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the C/C++ language-server startup path, using the reported c_cpp_properties.json and debug logs to reproduce the EPERM scan of f:/System Volume Information on Windows 11. Done means the language server starts and IntelliSense remains available after updating the extension, without the permission error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, typescript
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100