Using the gnu debugger, gdb. Compile your program with the -g option, e.g., g++ -g -Wall -Werror prog.cc (for separate compilation compile each .cc file with the -g option, e.g., g++ -g -c -Wall -Werror point.cc ) Then run gdb with the executable file, e.g., gdb a.out Some gdb commands: run execute the program bt show a "backtrace," the call stack list list about 10 lines of code help get the help file print display the contents of variable break stop execution on entrance to method break stop execution at line number step execute one instruction next execute the next line (if, e.g., a function call, execute the function) continue continue execution of the program