debugger for c++ using eclipse on mac

After I finally setup my mac to work with eclipse, I can't debug.

I've tried to google for help but non of the answers worked for me.

so, I need someone to help me install and use a debugger on eclipse for cc++.

I have Xcode 5.0 installed.

Thanks for your help

Roy


You have got several options:

  • Install GDB with MacPorts or Homebrew, as mentioned by trojanfoe and Charles Chow.
  • Use LLDB-MI from LLDB team; note that LLDB-MI does not come with the native LLDB on OS X, meaning you have to build LLDB your own with options to switch on the feature.
  • Use third-party LLDB-MI2 (see the page for reasons why he needs another Machine Interface)
  • All of these three options require a lot of configuration and are error-prone. I guess you may want to think twice when you prefer Eclipse to Xcode on OS X.


    It looks like eclipse doesn't support lldb , so you are probably better off ignoring the Xcode toolchain and instead installing Macports and g++/gdb from there:

    $ sudo port install gcc49 gdb
    

    It should then just be a case of setting up this new toolchain in eclipse; perhaps using:

    how to add custom tool chain to eclipse CDT

    (if not google "eclipse cdt configure toolchain")


    I found this tutorial teaches you how to install and setup GDB for eclipse on Mac OS X. It works on my machine. You need install Home Brew first.

    链接地址: http://www.djcxy.com/p/75154.html

    上一篇: 为什么.NET foreach循环在收集为空时抛出NullRefException?

    下一篇: 在Mac上使用eclipse的c ++调试器