'Visual code wxWidgets Intellisense works just once

I'm having a weird problem with Visual Code wxwidgets Intellisense. After I launch VC, within about 2 seconds, if I quickly mouse over a wxWidgets class or function it shows the appropriate data. After about 2 seconds, wxWidgets Intellisense stops working. C++ Intellisense continues to work fine.

This is the output of wx-config --cxxflags

-I/Users/lk/files/programs/wxWidgets-3.0.5/deploy/lib/wx/include/osx_cocoa-unicode-static-3.0 -I/Users/lk/files/programs/wxWidgets-3.0.5/include -D_FILE_OFFSET_BITS=64 -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__

This is my c_cpp_properties.json file

{
    "configurations": [
        {
            "name": "Mac",
            "includePath": [
                "${workspaceFolder}/**",
                "/Users/lk/files/programs/wxWidgets-3.0.5/include/**",
                "/Users/lk/files/programs/wxWidgets-3.0.5/deploy/lib/wx/include/osx_cocoa-unicode-static-3.0/**"
            ],
            "defines": [
                "_FILE_OFFSET_BITS=64",
                "__WXMAC__",
                "__WXOSX__",
                "__WXOSX_COCOA__"
            ],
            "macFrameworkPath": [
                "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks"
            ],
            "compilerPath": "/usr/bin/clang",
            "cStandard": "c17",
            "cppStandard": "c++98",
            "intelliSenseMode": "macos-clang-x64"
        }
    ],
    "version": 4
}

I'm using Visual Code 1.64.0 on macOS Big Sur. I have spent hours googling and debugging this but could not get it to work.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source