gdb ./program run break path/to/file.ext:line next print my_var
you can use these commands as a single letter Enter repeat the last command
Enter