I've been programming on the Mac since I was a little kid using THINK C. I've never had to use a debugger as bad as the one that comes with XCode.
The kernel debugger for Mac OS 9 was better than this. It's time to give up.
What standalone front-ends for GDB work on OS X? I found http://ddd.darwinports.com/ but it's hard to find praise or anecdotes for it, or other alternatives.
Support for STL containers is a big plus for me. I couldn't care less about Objective-C or Apple-anything.
You might be pushing "Run" instead of "Debug" in which case your program is not running with the help of gdb, in which case you cannot expect breakpoints to work! In Xcode 6.4, there is now only a Run button and whether it runs a debug configuration or not depends on the currently selected scheme settings.
LLDB is a debugging component used in the LLVM project which was developed by the LLVM developer group. Xcode uses the LLDB as the default debugging tool. The full form of LLDB is Low-level debugger. Breakpoints help a developer to stop the execution of the program at any point.
The Xcode debugger provides several methods to step through your code and inspect variables. You can precisely control execution of your code from a breakpoint, stepping into and out of called functions as necessary to determine where your bug occurs.
When you run an application in Xcode, the debugger is automatically started and attached to the process of the application. Click the Run button in the top left or press Command + R. From the moment the application is up and running, we can start inspecting the process and, if necessary, debug it.
I tend to use valgrind for memory related errors; gdb (in a teminal) when I want a backtrace; and logging + couts for all else (if it's not crashing, and there's no memory corruption, the bug seems easier).
Admittedtely, no idea how to debug multi threaded code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With