title: Eclipse CDT cannot debug using gdb on Mac
body: <p>I have a C++ project imported to Eclipse CDT. I can build and run the project using Makefile and argument settings. However, when I tried to add a debug point and run "debug as local c/c++ application", it throws me an error of <code>"Launching projectName" has encountered a problem. Error with command gdb --version</code>
  By expanding the Details, it gives: <code>Error with command: gdb --version
  Cannot run program "gdb": Unknown reason</code></p>
  
  <p>I installed the gdb by Macports before. If I enter command <code>ggdb</code> it returns the version info. If I type <code>which ggdb</code>, it gives <code>/opt/local/bin/ggdb</code>. I tried to add "PATH" to debug configuration -> environment variables and give the path value to it, but it did not work. How should I set the path and link the path please? And what should the variable name be.</p>
  
  <p>The gdb version on my machine is GNU gdb (GDB) 7.7.1</p>
  
  <p>Added: I looked up <code>which ggdb</code> and used the link James provided to change gdb debugger to browse to that path. But it did not work still. 
  <img src="https://i.stack.imgur.com/ZxLCq.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/A0mpP.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/7mDVJ.png" alt="enter image description here">
  Thanks. </p>