Greetings!
Finally stared learning C and I think the time has come to start working with a debugger. At this time I’m using Gvim for editor and command line for compiling. After trying few debuggers ( KDbg, ddd,insight ) running gdb seems to be the simplest and least overwhelming at the moment.
I’m I on the right path or is there a better way to go about it?
I also tried NetBeans and Anjuta, but they feel like a little bit much for this step of the journey.
Thanks in advance.
vim/gvim + gdb is a good path
Quite often you will be left with remote connection to a linux box and
gdbso it’s quite useful to know how to usegdbfrom command line.If you’re debugging on a local box with GUI you might try
dddor any other gui debugger. Gui debuggers provide easier ways of inspecting values of variables in memory for example if you have nested structures. However if you are linking additional libraries and you want to jump into them gdb is easier compared to for example Visual Studio.If you setup
Makefilein your project directory you can simply from inside vim use:To build your code and it will jump into the first warning/error. You can move to next error with:
Or view list of errors:
Jump between open multiple subwindows:
Hide list of errors, go to the window that shows errors and: