Why the vscode can't "found the definition"of the function?

Hi,all!
I use vscode to edit the px4’s code with OSX.It works very well before.But these days it can’t “go to definition"suddenly.And it can’t find the definition of the functions.
Besides,the issue comes with tons of problems, such as"identifier XXX is undefined”,“variable XXX is not a type name”.Curiously,the code can be compiled successfully!

Meanwhile,it responds with
“FixedwingPositionControl.cpp not found in “${workspaceFolder}/build/px4io-v2_default/compile_commands.json”. ‘includePath’ from c_cpp_properties.json will be used for this file instead.”

If the compile_commands.json have something to do with the issue?

To fix the issue,I have tried tons of methods.However,It still doesn’t work even after that I completely remove and reinstall all of the vscode and all of the px4’s code.what is the problem about the vscode?And how could I fix it? Thank you?