Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 c\c++.

I have Xcode 5.0 installed.

Thanks for your help

Roy

like image 464
Roy Weinstein Avatar asked Oct 23 '13 08:10

Roy Weinstein


People also ask

How do I debug in Eclipse Mac?

1.4. To debug your application, select a Java file with a main method. Right-click on it and select Debug As Java Application. If you started an application once via the context menu, you can use the created launch configuration again via the Debug button in the Eclipse toolbar.

How do I use debugger on Mac?

Setting breakpoints Setting a breakpoint is easy. Just open the source file you want to debug in Xcode, and click in the margin to the left of the line of code where you want to break. During the debugging session, each time that line is executed, the debugger will break there, and you will be able to debug it.

Is there a debugger in Eclipse?

Remote Debugging – The Eclipse IDE allows you to debug applications that runs on another Java Virtual Machine (JVM) or even on another machine. You can create a new debug configuration of the Remote Java Application type. To enable remote debugging you need to start your Java application with certain flags.

How do I enable debugging in Eclipse?

In the Eclipse settings under General->Error Reporting there is the option "Enable debug mode".


1 Answers

You have got several options:

  1. Install GDB with MacPorts or Homebrew, as mentioned by trojanfoe and Charles Chow.
  2. 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.
  3. 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.

like image 152
Franklin Yu Avatar answered Sep 21 '22 07:09

Franklin Yu