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

Re: Debugging Cocoa


  • Subject: Re: Debugging Cocoa
  • From: Ian Kemmish <email@hidden>
  • Date: Fri, 20 Feb 2009 12:11:24 +0000


On 20 Feb 2009, at 11:34, john smith <email@hidden> wrote:


Hi,I build an AU with a cocoa view using the XCode template. I'm trying to debug it, using AULab, but unfortunately breakpoints are only triggered in the carbon (i.e. the "effect") part of the code.In the cocoa code the breakpoints have the colour that indicates that the code is not loaded.My best guess is that it seems there's 2 copies of the bundle.. One in my debug folder, and one inside the AU.

How does the code know where to find the bundle anyway? I mean, I understand that GetProperty is called with kAudioUnitProperty_CocoaUI, but in the template generated code there's no path or anything, there's just this code:CFBundleRef bundle = CFBundleGetBundleWithIdentifier( CFSTR("com.yourcompany.cocoatest") );

Last time I checked, the documentation for CFBundleGetBundleWithIdentifier() explained that it looked for the resource in the Resources folder of the disc image of the bundle that you pass in the "bundle" argument.


You can check that it's actually there with Finder: right click on your bundle and select "Show Package Contents" and have a look in the Resources directory.

You can also look in Xcode's build results transcript to see whether and where your UI bundle gets copied into your AU bundle when you rebuild your project.

You can also run your host with gdb in a terminal window - debug the host you're using, and before running the host, set a breakpoint on the routine in your UI where you want to stop: gdb should halt when it loads any code that contains a routine with the right name and ask if you want to set the breakpoint.

If forced to guess, I'd say maybe you've managed to get your project into a state where recent builds of your UI are not getting copied into your AU's bundle when you rebuild. Check the "copy files" phase of your build settings for the AU target....

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ian Kemmish 18 Durham Close, Biggleswade, Beds SG18 8HZ
email@hidden Tel: +44 1767 601361 Mob: +44 7952 854387
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



_______________________________________________ Do not post admin requests to the list. They will be ignored. Coreaudio-api mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Prev by Date: FW: Cocoa and future
  • Next by Date: FW: Debugging cocoa
  • Previous by thread: Re: Recommend way for an Audio Unit to implement a background timer
  • Next by thread: Re: Debugging cocoa
  • Index(es):
    • Date
    • Thread