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 "
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 6.2k
- Forks
- 1.7k
- Ø Merge
- 14 Std. 46 Min.
- Gemergte PRs (30 T.)
- 61
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit dem Startpfad des C/C++-Language-Servers und verwende die gemeldete c_cpp_properties.json sowie die Debug-Logs, um den EPERM-Scan von f:/System Volume Information unter Windows 11 zu reproduzieren. Als erledigt gilt die Aufgabe, wenn der Language-Server startet und IntelliSense nach der Aktualisierung der Erweiterung weiterhin verfügbar ist, ohne dass der Berechtigungsfehler auftritt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- cpp, typescript
- Bereich
- developer-experience, tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100