• 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: Understanding the debugger a little bit better
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Understanding the debugger a little bit better


  • Subject: Re: Understanding the debugger a little bit better
  • From: Jim Ingham <email@hidden>
  • Date: Fri, 05 Feb 2016 11:51:53 -0800

> On Feb 5, 2016, at 11:39 AM, Jean-Daniel Dupas <email@hidden> wrote:
>
>>
>> Le 5 févr. 2016 à 19:28, Alex Zavatone <email@hidden> a écrit :
>>
>> I seem to recall back circa last century in Xcode 3.1.3 that when a view controller was instantiated that part of the loading/bootstrapping of the view controller was that it would automatically look for an XIB of the same name as the viewController and load that on the Mac OS.
>
> Strange your recall that. It is documented as working since 10.10 (which did not exists at the time Xcode 3.1.3 was the standard):
>
> From -[NSViewController loadView] header documentation.
>
> Prior to 10.10, -loadView would not have well defined behavior if [self nibName] returned nil. On 10.10 and later, if nibName is nil, NSViewController will automatically try to load a nib with the same name as the classname. This allows a convenience of doing [[MyViewController alloc] init] (which has a nil nibName) and having it automatically load a nib with the name "MyViewController".
>
>
>> On iOS, I recall that it would look for a xib of the same name as the view controller for the iPhone and then it would look for an xib with the same name of the view controller and "~iPhone.xib" and it would automatically look for an xib that was the same name of the view controller + "~iPad.xib".
>>
>> Now, I can't seem to find any of the docs that mentioned this and I'm trying to verify this functionality and where it is called from by stepping through the debugger at the view controller's initialization.
>>
>> This is where I need some help.
>
> I think the magic append in -loadView, so you should break on the loadView method.
>
> Honestly, I never managed to get the exact selector patter right when trying to set a breakpoint, so I usually use a regex breakpoint. In the lldb console type:
>
> b -r loadView

If you want to break on all instances of a selector in lldb you can also say:

(lldb) break set -S loadView

Jim


>
>
>> I'm looking for effective ways of either setting a breakpoint on keywords or internal classes that would indicate where this happens so I can explain how and where this happens to the rest of the team.
>>
>> Are there any techniques in using the debugger that would help in this effort?
>>
>> Are there any recommended classes in the framework where setting breakpoints on the headers would be useful?
>>
>> Would it make sense to add methods from super to my view controller that are part of the init process that would shed some light on this?
>>
>> I'm not seeing a breakdown of the VC initialization process and methods called in the VC programming guide or the class reference.
>>
>> Are there any better places to look?  Is there an clear method to set a breakpoint when an XIB is loaded?  I've tried setting breakpoints in the bundle class's load method to no avail.
>>
>> Thanks for pointing me to the right direction.
>>
>> Alex Zavatone
>> _______________________________________________
>> 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
>
> _______________________________________________
> 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


 _______________________________________________
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


  • Follow-Ups:
    • Re: Understanding the debugger a little bit better
      • From: Alex Zavatone <email@hidden>
References: 
 >Understanding the debugger a little bit better (From: Alex Zavatone <email@hidden>)
 >Re: Understanding the debugger a little bit better (From: Jean-Daniel Dupas <email@hidden>)

  • Prev by Date: Re: Understanding the debugger a little bit better
  • Next by Date: Re: Understanding the debugger a little bit better
  • Previous by thread: Re: Understanding the debugger a little bit better
  • Next by thread: Re: Understanding the debugger a little bit better
  • Index(es):
    • Date
    • Thread