• 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: Debug Problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debug Problems


  • Subject: Re: Debug Problems
  • From: Chris Espinosa <email@hidden>
  • Date: Sun, 12 Jun 2005 23:05:09 -0700

On 12 Jun 2005, at 1:25 PM, Jesse Grosjean wrote:

Create new Cocoa Application.
Select the project and choose "get info"
Click the build tab, verify that the debug configuration is set, and the Optimization Level is set to Fastest, Smallest.

Does anyone know why this would be the case?

This, of course, is not the controlling setting. The controlling setting is the Debug build configuration for the application _target_, which is set to -O0, overriding the (admittedly wrong) default set by the project Debug configuration.

Confusion over what-trumps-what (Target trumps Project) seems to be at the root of the conflicting reports of whether the templates set the right optimizations.

I see. The reason it made a difference in my case was because I was running a "Custom Executable" to run and debug my unit tests, I guess custom executables use the project configuration.

When you create a new Cocoa Application project in Xcode 2.1, here's what you get:

- Project
    Debug Configuration: Os
    Release Configuration: Os
    Default Configuration: Os

- Target
    Debug Configuration: O0  (target-specific override of project default setting)
    Release Configuration: Os
    Default Configuration: Os

Perhaps the Debug configuration in the Project should be -O0, so that you don't need a target-specific override.  But out of the box, this is set up correctly.  

If you set up a custom executable for debugging, but pointed it at the executable in the Release directory (instead of the one in the Debug directory), then you'd be attempting to debug an optimized executable regardless of what your Debug optimization settings are, at whatever level.

Chris
 _______________________________________________
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: 
 >Debug Problems (From: Jesse Grosjean <email@hidden>)
 >Re: Debug Problems (From: Prachi Gauriar <email@hidden>)
 >Re: Debug Problems (From: Jesse Grosjean <email@hidden>)
 >Re: Debug Problems (From: Fritz Anderson <email@hidden>)
 >Re: Debug Problems (From: Jesse Grosjean <email@hidden>)

  • Prev by Date: Re: not-used-in-precomps
  • Next by Date: How to allow for multiple instances of application?
  • Previous by thread: Re: Debug Problems
  • Next by thread: Re: Debug Problems
  • Index(es):
    • Date
    • Thread