It is now possible to debug medios using gdb the popular GNU debugger (
GDB) It is also possible to use any interface to gdb like Insight or ddd.
You will find an howto here:
gdb
It is possible to do stepping add breakpoints during runtime or at build and of course consult variable values.