vscode-cpptools icon indicating copy to clipboard operation
vscode-cpptools copied to clipboard

Unable to start the C/C++ language server. IntelliSense features will be disabled. Error: TypeError: entries.forEach is not a function

Open hazarde0us opened this issue 2 years ago • 1 comments

Discussed in https://github.com/microsoft/vscode-cpptools/discussions/9663

Originally posted by hazarde0us July 31, 2022 I simply get the message "Unable to start the C/C++ language server. IntelliSense features will be disabled. Error: TypeError: entries.forEach is not a function", It does me no harm though. When i uninstall the extension c/c++ the message goes away i tried the pre-release version, but still the same issue.

Also my Intellisense is not working. How do I dissolve this issue?

Below are the JSON files:

c_cpp_properties.json
{
    "configurations": [
        {
            "name": "Mac",
            "includePath": ["/Library/Developer/CommandLineTools/usr/include","${workspaceFolder}/**"],
            "defines": [],
            "macFrameworkPath": [
                "/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks"
            ],
            "compilerPath": "/usr/bin/clang",
            "cStandard": "c17",
            "cppStandard": "c++17",
            "intelliSenseMode": "macos-clang-arm64",
            
        }
    ],
    "version": 4
}

settings.json file:

{
    "workbench.editorAssociations": {
        "*.ipynb": "jupyter.notebook.ipynb"
    },
    "C_Cpp.updateChannel": "Insiders",
    "editor.suggestSelection": "first",
    "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
    "files.exclude": {
        "**/.classpath": true,
        "**/.project": true,
        "**/.settings": true,
        "**/.factorypath": true
    },
    "workbench.editor.untitled.hint": "hidden",
    "explorer.confirmDelete": false,
    "code-runner.runInTerminal": true,
    "java.home": "D:\\JDK Java",
    "githubPullRequests.queries": [
        {
            "label": "Waiting For My Review",
            "query": "is:open review-requested:${user}"
        },
        {
            "label": "Assigned To Me",
            "query": "is:open assignee:${user}"
        },
        {
            "label": "Created By Me",
            "query": "is:open author:${user}"
        }
    ],
    "githubIssues.queries": [
        {
            "label": "My Issues",
            "query": "default"
        },
        {
            "label": "Created Issues",
            "query": "author:${user} state:open repo:${owner}/${repository} sort:created-desc"
        },
        {
            "label": "Recent Issues",
            "query": "state:open repo:${owner}/${repository} sort:updated-desc"
        }
    ],
    "git.autofetch": true,
    "git.confirmSync": false,
    "git.enableSmartCommit": true,
    "code-runner.executorMap": {
        "javascript": "node",
        "java": "cd $dir && javac $fileName && java $fileNameWithoutExt",
        "c": "cd $dir && gcc $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
        "cpp": "cd $dir && g++ -std=c++17 $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
        "objective-c": "cd $dir && gcc -framework Cocoa $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
        "php": "php",
        "python": "python -u",
        "perl": "perl",
        "perl6": "perl6",
        "ruby": "ruby",
        "go": "go run",
        "lua": "lua",
        "groovy": "groovy",
        "powershell": "powershell -ExecutionPolicy ByPass -File",
        "bat": "cmd /c",
        "shellscript": "bash",
        "fsharp": "fsi",
        "csharp": "cd $dir && dotnet run $fileName",
        "vbscript": "cscript //Nologo",
        "typescript": "ts-node",
        "coffeescript": "coffee",
        "scala": "scala",
        "swift": "swift",
        "julia": "julia",
        "crystal": "crystal",
        "ocaml": "ocaml",
        "r": "Rscript",
        "applescript": "osascript",
        "clojure": "lein exec",
        "haxe": "haxe --cwd $dirWithoutTrailingSlash --run $fileNameWithoutExt",
        "rust": "cd $dir && rustc $fileName && $dir$fileNameWithoutExt",
        "racket": "racket",
        "scheme": "csi -script",
        "ahk": "autohotkey",
        "autoit": "autoit3",
        "dart": "dart",
        "pascal": "cd $dir && fpc $fileName && $dir$fileNameWithoutExt",
        "d": "cd $dir && dmd $fileName && $dir$fileNameWithoutExt",
        "haskell": "runhaskell",
        "nim": "nim compile --verbosity:0 --hints:off --run",
        "lisp": "sbcl --script",
        "kit": "kitc --run",
        "v": "v run",
        "sass": "sass --style expanded",
        "scss": "scss --style expanded",
        "less": "cd $dir && lessc $fileName $fileNameWithoutExt.css",
        "FortranFreeForm": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
        "fortran-modern": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
        "fortran_fixed-form": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
        "fortran": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt"
    },
    "workbench.preferredHighContrastColorTheme": "Default Dark+",
    "window.autoDetectColorScheme": true,
    "editor.fontFamily": "monaco",
    "workbench.preferredLightColorTheme": "Default Dark+",
    "code-runner.languageIdToFileExtensionMap": {

        "bat": ".bat",
        "powershell": ".ps1",
        "typescript": ".ts"
    },
    "editor.language.brackets": [
    
    ],
    "editor.fontSize": 14,
    "cmake.debugConfig": {
    
    },
    "cph.language.cpp.Args": "-std=g++17",
    "[json]": {
        "editor.defaultFormatter": "vscode.json-language-features"
    }
}
```</div>

hazarde0us avatar Aug 01 '22 19:08 hazarde0us

Do you have any other C_Cpp setting set in your user/remote/workspace settings? The settings provided appear to be for the workspace folder.

We're not sure yet how this TypeError is possible or how to repro it.

sean-mcmanus avatar Aug 01 '22 19:08 sean-mcmanus