OK, I think I find the solution.
See below:
I just edit the cpp file 's build option dialog, check on the option: use the custom command to build this file.
$compiler $options -femit-class-debug-always $includes -c $file -o $object
And now, I can see the variables contents now under GDB.
I think this is a nice feature which can help use to debug the client code which link to a release version of a third part library.
EDIT:
Oh, no, I see the problem still exists.
FYI:
This problem is totally solved now.
See the solution here:
https://github.com/ssbssa/gdb/issues/9#issuecomment-1980016412
That actual change you need to do is to change the build option for a single cpp file to:
$compiler $options -DNOPCH -femit-class-debug-always $includes -c $file -o $object
Happy coding and happy debugging.