VSCode intellisense not wotking

Running vscode and opening the project folder automatically recognizes the cpp files and installs the cpp-tool extension. But intelliSense is not working. I have also detected the following error in the logs generated by --verbose run: [313:0102/190516.356994:ERROR:bus.cc(395)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket:

Running vscode as root user solves the problem. sudo /opt/vscode/bin/code --user-data-dir ~

Anyone similar experience? Seems a permission problem but I can not find how to fix it.