Categories: CategoryCpp, CategoryEmacs

Compile c-sources with option -g.

Start debugger with gdb a.out.

gdb has following commands:

run      
// run program

break n
// set breakpoint

watch varname
// watch all changes of variable

contiune
// continue program

quit
// bye bye

Emacs has an graphical interface to gdb (GUD).