Some Linux IDEs for C++

I recently went on a short excursion looking for good, lightweight IDEs for C++ in Linux, similar to my adventures with Python IDEs. My (modest) needs are similar to my Python IDE needs, specifically however I want very good step-through debugging support, and in terms of a lightweight solution, would like a tool that doesn’t have a big project/workspace overhead with the IDE creating many of it’s own files (our C++ programs all have simple makefiles, with debugging info turned on and code optimisation suppressed by compiling with the -g and -O0 flags).

Here is what I found:

  • GDB is the GNU debugger used by GCC and actually has a text interface for step-through debugging that is actually usable – if you are very patient. There is also a graphical interface called DDD, however I did not try this.
  • Anjuta DevStudio is an IDE for GNOME. Debugging is activated with a plugin found under Edit/Preferences/Installed Plugins. This IDE worked OK for me in 32 bit Linux, but failed (shutting itself down) when trying to debug under 64 bit Linux.
  • CodeLite is a cross-platform IDE, that seemed to work well at first, however I could not get it to respect my program’s command line arguments.
  • Geany is an IDE with a clean presentation that I have used in the past just to look at C++ code; debugging is supposedly achieved with a plug-in called GeanyGDB, however I did not try it.
  • Code::Blocks is a very mature IDE that is a little chunky-looking in appearance (though it’s download size suggests it is more lightweight than the IDEs listed above), and seemingly requires you to make various project files (at least that seemed the easiest way to get it to a point where I could use it for debugging). However, the debugging does work rather well (and it even supports the Mighty Middle Click). Though it does not seem to show variable internals for more complex variables (dereferencing STL iterators would be nice, but maybe I’m missing something there), this will be my IDE of choice in Linux for a little while at least, I think.

Trying out these IDEs in Linux has, if nothing else, emphasised to me just how impressive, powerful and usable Microsoft’s Visual Studio is (for Windows only, of course). I have used Visual Studio in it’s various incarnations since 1996, and it keeps upping the bar even with the 2010 version with awesome debugging features like “Pin to source”, which lets you make little variable watch windows right alongside the line of code that it is relevant for. It offers so much at a glance (local variable values, current stack, etc) in an elegant way, and one quickly becomes used to being able to look deep into the internals of STL data types, change the line of execution or a variable’s value while debugging, and the like.

One thing that would be really good is if all these IDEs standardised their debugging hotkeys; as the table below shows (where I have also included Eric and Firebug), they are generally all different. I think Eric’s scheme is the best, as it seems logical and doesn’t require any contortions with Shift and Control keys.

 

Start Continue Step Step into Step out Stop
Anjuta F4 F4 F6 F5 Shift-F5 none Codeblocks F8 Ctrl-F7 F7 Shift-F7 Ctrl-Shift-F7 none Visual Studio and CodeLite F5 F5 F10 F11 Shift-F11 Shift-F5 Eric F5 F6 F7 F8 F9 F10 Firebug n/a F8 F10 F11 Shift-F11 n/a
0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published.