As said here (Need help on C++ Intellisense - #2 by maxgerhardt) you have the wrong extensiosn installed. C/C++ Intellisense by austin is wrong and may be causing conflicts, as well as the other C++ extension potentially.
What’s the platformio.ini
of the project you’re trying to debug?