Re: Breakpoints not Hit
Re: Breakpoints not Hit
- Subject: Re: Breakpoints not Hit
- From: Steve Sisak <email@hidden>
- Date: Fri, 3 Nov 2006 21:45:45 -0500
At 9:59 AM -0600 11/3/06, Michael Rice wrote:
I'm using Xcode 2.4.1 on MacBook Pro. I have a project that is a
collection of C++ subprojects (libraries and an application). If I
open a subproject and set a breakpoint in a method and then switch
back to the parent project and run the application target, the
breakpoint is never hit.
I get a warning from GDB: "No location found for
"mainwindow.cpp:635". This is my breakpoint location. The breakpoint
is in a source file in the application.
Any ideas on how to get this working?
By any chance do you have multiple monitors?
If so, I have a series of open bugs against Xcode that may be related:
4602145
Xcode Breakpoints won't go away
26-Jun-2006 12:54 PM
Serious Bug
Duplicate
4602123
Xcode Breakpoints drift with use
26-Jun-2006 12:48 PM
Serious Bug
Open
4602089
XCode Windows Messed Up When dragging between monitors
26-Jun-2006 12:41 PM
Serious Bug
Duplicate
The trigger seems to be having an Xcode window resize as the result
of being dragged from a larger monitor to a smaller monitor, or to
avoid the dock when dragged between 2 monitors of equal size (as
opposed to manually resizing the window).
When this happens, there are visible symptoms, like the upper panes
in the various windows becoming invisible -- which you can sometimes
fix by resizing the window manually.
However, breakpoints seem to wander a bit relative to the code. Most
of the time you can work around this by quitting an launching Xcode.
Clean/rebuild is unnecessary (and does not help anyway) -- it appears
that Xcode's in memory caches are getting out of sync.
Once you've quit and relaunched, some of your old breakpoints will be
back where they belong, but any you've added since the caches got out
of sync will be in the wrong place.
Usually, you can remove and re-add them and all will be right again.
However, sometimes (every day or two for me), you'll end up with
breakpoints that you can't remove -- or more explicitly, will go away
for the duration of the launch of Xcode but come back every time you
quit and relaunch Xcode.
I suspect that this is the result of an asymmetry in how breakpoints
are displayed and how they are stored -- the visual representation
doesn't map to the text representation in the plist where they're
stores, so that when you delete them, they're removed form the
in-memory cache, but not the disk representation.
As a result of this, you can also end up with 5 or 6 breakpoints at
the same location, which you will hit and have to remove after every
launch.
The only workaround for this that I've found, it to open the project
bundle and delete your <user>.pbxuser and <user>.mode1 files.
This will blow away all of your save breakpoints, as well as any
custom executable settings (command line arguments), window
positions, etc. but at least you won't have to remove 20 obsolete
breakpoints each launch.
(It would be nice if the Breakpoints window had a "Delete All" button
that blew away all breakpoints in the project store w/o making any
attempt to match then up with the UI -- at least that would save some
time recreating command-line arguments for executables, etc.)
In any case, hope this helps someone, as it's been driving me nuts for months.
Cheers,
-Steve
_______________________________________________
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