Add .gdbinit file in your home directory (if it didn’t work try Linux root: /root/.gdbinit). Past this content into the file:
# info:
printf "\n\n***this is .gdbinit in ROOT dir***\n"
# Load local gdb
set auto-load local-gdbinit on
add-auto-load-safe-path /
printf "\nLocal .gdbinit file can be loaded now.\n"
The other .gdbinit file is a part of the project and should be inside Git clone folder of the project:
# info:
printf "\nThis is .gdbinit in local Git dir\n"
# To skip default .h files
skip -gfile /usr/include/c++/9/bits/*.h
printf "\n"
Number 9 on line 4 above, may be wrong for you depending on your GCC version.
When you run in debug mode you should see this on the GDB tab of Clion: