Xcode scheme for plugin development?


#1

Has anyone figured out a scheme for compile/run/debug for a plugin from one project? 

Right now, I'm building my plugin from it's project, then go to the Plugin Host project and run that. 

Seems like there could be a clever way to do it all in one project, but it escapes me.

 

Thanks.

 


#2

Yes, this is what people are doing: build the plug-in from its project, then launch the host app and attach your debugger to that, then load the plugin in the host.

Xcode has a thing in the Scheme settings so that you can tell it to launch the host and attach to it automatically, when you hit "Run" in the plugin's project:


#3

This looks great, but what about debugging?

 


#4

Did you try putting a breakpoint in your plugin code before running your debug version of the plugin? You should probably start with adding a breakpoint in a spot where you're sure the plugin code is getting called (such as your AudioProcessor constructor), and then once you're sure the breakpoint is being hit, remove it and set it where you really need it.

Note that some hosts (such as ProTools) may have trouble getting debugged (there are special development versions of ProTools that can help you with this, once you are a registered RTAS/AAX developer).


#5

Yes, debugging the plug-in should just work as normal (as long as the plug-in's Xcode project is attached to the host application, and the plug-in itself is loaded in the host). 

Afaik the "3rd party developer" version of ProTools is mainly needed because the normal ProTools won't let you load unsigned AAX plug-ins (which debug builds are).