Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XCode debugger sucks; alternatives? [closed]

Tags:

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.

  • It's unresponsive, and bogs down further and becomes unstable when watching more variables.
  • When it crashes, I lose undo history for my sources because it's integrated with the editor.
  • It doesn't benefit from integration, though, as the source viewer is unusable for stepping: Trying to select a line by clicking on the left margin makes a button appear from nowhere which causes to program to continue to that line, in the editor window, which shouldn't relate to debugging in the first place. Horrible UI and horrible implementation.
  • A hobbled pretty-data "summary" syntax which can't send an object to the Expressions window.
  • he Expressions window isn't aware of any kind of context, ever.
  • Can't select a particular thread to debug, far as I can tell, and doesn't jump to the thread that called abort().

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.

like image 953
Potatoswatter Avatar asked Jan 07 '10 22:01

Potatoswatter


People also ask

Why breakpoints are not working in Xcode?

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.

What is LLDB in Xcode?

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.

Does Xcode have a debugger?

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.

How do I run debugger in Xcode?

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.


1 Answers

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.

like image 80
anon Avatar answered Oct 05 '22 23:10

anon