So far so good, but the default PATH environment variable on my El Capitan has /usr/bin coming before /opt/local/bin I figured that Eclipse might be looking for gdb in the same directory that it found gcc and g++, and so I went to /opt/local/bin where 'port' put ggdb and added soft links there to /usr/bin/gcc and /usr/bin/g++Īt the same time, I added a soft link from gdb to ggdb While Marco83's answer certainly worked, I wanted something that would work out-of-the-box for my students, only some of whom are using Mac OS X (the others have Windows computers using MinGW and Linux Computers). Open the run (debug) configuration and check the 'Debugging' tab. I suggest changing it globally but be aware that run configurations created before you changed the value will still have the old value and will need to be updated manually. You can set this property in Eclipse globally (Preferences -> C/C++ -> Debug -> GDB) or per project. Running which gdb in terminal should tell you what is the right path. You have to change the path of GDB in Eclipse from gdb to /usr/local/bin/gdb or similar. I exactly followed this guide: Eclipse GDB MacOSX Mavericks, but it didn't fix it.
Eclipse MacOSX Mavericks - gdb version I encounter the problem that even though after installing gdb Eclipse still gives out the error message 'Error with command -gdb version' whenever I try to compile my code.