• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Xcode is optimizing debug builds, screwing up the debugger
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode is optimizing debug builds, screwing up the debugger


  • Subject: Re: Xcode is optimizing debug builds, screwing up the debugger
  • From: Jeffrey Walton <email@hidden>
  • Date: Wed, 14 Aug 2013 15:05:16 -0400




On Wed, Aug 14, 2013 at 2:45 PM, Fritz Anderson <email@hidden> wrote:

On 14 Aug 2013, at 10:59 AM, Jens Alfke <email@hidden> wrote:

For quite a while I’ve been having frustrating problems with the Xcode debugger: breakpoints not being hit or stopping at the wrong line; inability to display variable values (“variable not available”), etc. But only in some projects — others work fine. I just assumed LLDB was intermittently flaky and didn’t investigate too much.

But today I ran into this again, and I dug into the target build settings and saw that the optimization level is “Fastest, smallest” (-Os). Oops, yeah, that’s going to mess up the debugger. :-P But that setting isn’t coming from the project — Xcode is defaulting to full optimization even for the Debug configuration. I changed the setting to No Optimization, and poof, the debugger problems went away.

What version? What template? I just used Xcode 4.6.2 to instantiate an iOS single-view application, and the template set -O0 at the project level for the Debug configuration.

The far-right column, "iOS Defaults," has to be a unified fallback for every setting in every configuration. I'm pretty sure those defaults know nothing about debugging — configurations don't go that deep, and a generic iOS product should be -Os.

Xcode is doing the right thing; the question is, where did that defective template (which does know about configurations) come from?
If Xcode is doing the right thing then something is broken elsewhere.

Debug and Release build configurations suffer in other areas besides Optimizations (-On). The other areas I have observed include Preprocessor (use of DEBUG and NDEBUG; use of NS_BLOCK_ASSERTIONS); and Warnings (or lack thereof in Debug and Release builds).

I attempted to located a method to "fix" the default configurations, but they are supposedly baked in and cannot be changed. http://stackoverflow.com/questions/14109712/xcode-4-edit-build-settings-template-for-ios-default-and-mac-os-x.

Jeff
 _______________________________________________
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

References: 
 >Xcode is optimizing debug builds, screwing up the debugger (From: Jens Alfke <email@hidden>)
 >Re: Xcode is optimizing debug builds, screwing up the debugger (From: Fritz Anderson <email@hidden>)

  • Prev by Date: Re: Xcode is optimizing debug builds, screwing up the debugger
  • Next by Date: Urgent: Xcode suddenly can't connect to my iPad
  • Previous by thread: Re: Xcode is optimizing debug builds, screwing up the debugger
  • Next by thread: Re: Xcode is optimizing debug builds, screwing up the debugger
  • Index(es):
    • Date
    • Thread