GCC, the GNU Compiler Collection is probably best for compiling small programs.

For Windows use mingw-w64 distribution, use the link provided here! Alternatives are TDM-GCC and MinGW. Install version 5.2 or later because some previuos versions have severe bugs. Add bin subfolder to system PATH.

To compile a Fortran code run gfortran codefile -o binaryfile.

For debugging use GDB. Instructions: compile your code using -g option and then run gdb --args binaryfile arguments, start debugging with break main followed by run, then use s to go through your program step by step, use print variablename for variables and q to exit.

Help for Fortran see here.