Gdb or GNU Project Debugger is a great tool when you need to debug a program. You can set breakpoints, watch for value change of a variable, or even change a value for the program while it is halted at a point of it's state, then continue, just to pick some of the features of gdb.
This is a companion discussion topic for the original entry at https://linuxconfig.org/how-to-install-gdb-in-redhat-linux-8