Re: Xcode debug follow fork
Re: Xcode debug follow fork
- Subject: Re: Xcode debug follow fork
- From: "Dee Ayy" <email@hidden>
- Date: Fri, 14 Nov 2008 22:03:49 -0600
On Fri, Nov 14, 2008 at 12:29 PM, Jim Ingham <email@hidden> wrote:
> To use that in Xcode, open your Xcode project, edit the "active executable"
> (in Project->Edit Active Executable) switch to the Debugging tab, and
> uncheck "Start executable after starting debugger". Then start the Xcode
> debugger. Xcode will load your program into the debugger, but won't try to
> run it. So then you can open the Console (Run->Console) and type:
>
> (gdb) attach -waitfor my_app
>
> Then go to terminal & start up your app. Go back to Xcode and if the stars
> are correctly aligned, xcode should have attached to your program early in
> its startup code. Then you can continue from there and debug as you
> normally would.
>
> Jim
Thanks. This seems to work.
On Xcode 2.5, Tiger 10.4.11, I suppose the Console opens for me when I
choose (Debug->Console Log) or click the Debug icon in the top left
corner grouping (Project | Build | Debug)
I had copied the my_app executable, which Xcode built, to a different folder.
Used attach -waitfor my_app
Xcode reported: Waiting for process 'my_app' to launch
>From terminal, I started my_app from this different folder.
Xcode reported: Attaching to program: /the/original/Xcode/build/folder/my_app
So I believe the stars aligned somewhat. But only about 1 in 10 tries
(invoking about 5 as ./my_app <my_log_of_old_pipe_info and 5 as cat
my_log_of_old_pipe_info | ./my_app) landed on the error I get
consistently from a core dump. I haven't landed on that error a
second time using the Xcode debugger. Weird. But you've answered the
main issue of this post which was to debug my app in Xcode which I
invoke strangely (as opposed to needing follow fork anyway).
Thanks again.
_______________________________________________
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