Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Debug Minefield on Intel Mac

3 views
Skip to first unread message

Sergey Shapovalov

unread,
Oct 24, 2006, 8:33:33 AM10/24/06
to dev-apps...@lists.mozilla.org
Hello all.

I have obtained latest mozilla sources via CVS and compiled
Minefield from them. Now I want to debug the application in
XCode. Can anybody tell me, how can I do it step by step?

Here is what I have already done. I've started with visiting
http://developer.mozilla.org/en/docs/Debugging_on_Mac_OS_X
Following the instructions from that page, I created a new
empty project in XCode and set custom executable to firefox-bin
located inside MinefieldDebug.app. After that, I can say "Debug"
in XCode, and it will launch Minefield indeed, but it doesn't
stop on breakpoints I set in the source code, and when I
manually pause the browser from XCode, I see the stack trace
but I don't see the source code - only compiled assembler
instructions.

I'm experiencing this on my Intel iMac, MacOS X 10.4.7,
XCode 2.4. Below is my '.mozconfig' file contents:

. $topsrcdir/browser/config/mozconfig
. $topsrcdir/build/macosx/universal/mozconfig
#ac_add_options --enable-optimize=-O2
ac_add_options --disable-optimize
ac_add_options --enable-debug
ac_add_options --disable-shared
ac_add_options --enable-static
ac_add_options --disable-tests
ac_add_app_options ppc --enable-prebinding
ac_add_options --enable-default-toolkit=cocoa
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../build

Am I doing something wrong? Is it possible at all to
debug Minefield in XCode with my environment?

Best regards,
Sergey.

Robert Sayre

unread,
Oct 24, 2006, 5:35:12 PM10/24/06
to Sergey Shapovalov, dev-apps...@lists.mozilla.org
Sergey Shapovalov wrote:
>
> Am I doing something wrong? Is it possible at all to
> debug Minefield in XCode with my environment?

You'll probably find that XCode will work if you quit Minefield.app and
start it again. This one-time hiccup happens whenever you rebuild. There
are environment variables you can set to prevent this:

MOZ_NO_REMOTE = 1
NO_EM_RESTART = 1

I've also found that XCode doesn't always work correctly when the
project is first created. Restart XCode after you've created and saved a
project.

-Rob

Sergey Shapovalov

unread,
Oct 25, 2006, 5:32:06 AM10/25/06
to Robert Sayre, dev-apps...@lists.mozilla.org
Robert,

thank you very much for your answer!

I've just solved the problem myself, and the reason of my trouble
appeared to be something different: it was universal binary set as
custom executable for XCode project. As soon as I changed it to
i386 MinefieldDebug build, XCode began to show the source code
while debugging. It looks like that probably debug information
is stripped out of the UB...

Best regards,
Sergey.

0 new messages