Give gdb a try, the GNU debugger. It admittedly has a steep learning curve, but it really lets you inspect things in detail between single-stepping through your source. The kind of insight gained with a debugger is unrivaled (yet often avoided even by professional coders) in my opinion.
I personally use gdb with a slightly modified GDB dashboard.