Single Stepping Debugger Doesn't Work
Single Stepping Debugger Doesn't Work
- Subject: Single Stepping Debugger Doesn't Work
- From: Simon Wilson <email@hidden>
- Date: Sun, 4 Nov 2007 15:06:30 +0100
This mail was originally posted to Apple's developer support forum on
discussions.apple.com. It was suggested that I might get more helpful
responses from Apple's mailing lists, hence the cross-post. My sincere
apologies to anyone who might have come across this before...
I've been developing a Cocoa app for Tiger using 2.4.x for the last
year or so and have frequently been having problems with the debugger.
Breakpoints are triggered correctly but the debugger will hang, for
10-20 seconds when stepping through the code, complaining of time-outs.
Thankfully, this didn't happen during every debug run and I chalked it
up to Xcode's debugger being slightly flakey. It was irritating, but I
would simply restart the debugger and most times I could then debug
far enough before the debugger started hanging to get the information
I needed.
In addition, variable display was frequently blatantly incorrect,
often showing "out of scope" or "invalid" for variables which are
guaranteed to be valid and in scope.
I upgraded to Leopard last week and immediately installed Xcode 3.
Debugger reliability has gone from bad to worse. Inline "in-Editor"
debugging doesn't work at all. Never. It seems to be completely
broken. The current position indicator never moves from the line with
the triggered breakpoint.
I have had more success with the traditional debugger set-up, but the
reliability is much, much worse than with 2.4 under Tiger. It's so bad
that I am faced with going back to 2.4 to do any serious debugging,
which is something I really don't want to have to do...
The behavior under 3.0 is as follows: The breakpoints trigger
reliably, but single-stepping sometimes doesn't work at all. Instead
of stepping into/over method calls, I just land in the assembly for
the symbol:
asm dyld_stub_objc_msgSend
Stepping in, over or out does nothing. The debugger never gets onto/
into the line/method I want to step to. Debugging seems to be fine in
certain modules/files, and refuses to work at all in others. All
breakpoints I have tried have been in application code (i.e. not in
frameworks or dynamic libraries).
The variables view is also frequently plagued by incorrect "out of
scope" or "invalid" values.
This is driving me absolutely nuts. A reliable debugger is the
absolute minimum I need to get anything done and Xcode 3's debugger
has proven to be hugely frustrating so far.
Here's some more information about my development environment:
1) I'm running Xcode 3 general release on a GM Leopard installation. I
did a clean Leopard install. I am running on a 2GHz Core Duo MacBook
Pro.
2) My Xcode project was originally created by 2.4 and 3.0 was able to
open it OK.
3) I am building a Cocoa app which is dependent on 4 custom Objective
C frameworks. The 4 framework projects are part of the application's
Xcode project.
4) The xcodeproj files are 2.4 format allowing me to develop/debug
under Tiger with 2.4 if necessary. I am targeting the 10.4u SDK.
5) The application is heavily multi-threaded. All threading is done
using ObjC/Cocoa threads, i.e. using NSThread. All synchronization is
done using @synchronized
6) The code is Objective-C++ (i.e. .mm files). However, 99.9% of the
code is ObjC, the other .1% are simple C++ classes
7) I have disabled all optimizations in all projects. Optimized ObjC
dispatch is also disabled
Any help in getting the Xcode 3 debugger working more reliably would
be vastly appreciated.
Thanks,
Simon
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden