realbasic-plugins
[Top] [All Lists]

RE: Developing plugins with Xcode

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: RE: Developing plugins with Xcode
From: James Milne <james dot milne at mac dot com>
Date: Mon, 22 Nov 2004 17:38:58 +0000
Cc: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
References: <4C363D59B85C15428352416C6E3FC8C96AEDE1 at dtetex02 dot dtusa dot dtcorp dot biz>
 
On Monday, November 22, 2004, at 05:14PM, Campbell, Jason <Jason_Campbell at 
daytimer dot com> wrote:

>James,
>
>I think it is great you have managed to spur some feedback on this topic.  
>I've been awaiting some actual working debug-capable steps for XCode.  Though 
>I cannot seem to reproduce your solution...  I don't have the setup for 
>automatically bundling the dylib to .rbx, but I did that by hand with the 
>sdk's plugin converter.  XCode fires up RB IDE, but does not break anywhere in 
>my plugin when the program is executed.  I had two questions: 1) I assume we 
>set RB to 'OS X Carbon Mach-O' versus the PEF option or does it matter?, and 
>2) not sure why/how it works being set to the IDE when all past discussion 
>(i.e. CW debugging) has centered around pointing at a built RB project?  Can 
>you clarify these points?

For Xcode to debug your plugin, you need to configure RB to generate a Mach-O 
application. Xcode cannot debug CFM as far as I am aware.

On reflection, you are correct about targeting the built application. My steps 
don't reflect that. When I had been writing that e-mail, I was just making sure 
that breakpoints in the registration functions etc were hit. Those are called 
when you are running the IDE, but of course, the other functions won't be 
called unless you are running in a built application.

To debug an actual application, you will need to target the built app. It does 
seem that you can't debug your plugin and your REALbasic code in the same 
session. When you are debugging REALbasic code, the Xcode debugger has no way 
of attaching to the built application. The only way you can debug your plugin 
is to add your built Mach-O application to your Xcode project as an executable. 
This will get Xcode to launch your built app, with your plugin inside it. 
However, in this situation, you won't be able to use REALbasic to debug the 
REALbasic code in your built-app (even Remote Debugging can't help here.)

That is indeed a quandry.

I guess what we really need is the ability to have the Xcode debugger attach to 
an already running process. You could start debugging in REALbasic, which would 
launch the debug version of your app, allowing you to set breakpoints in your 
RB code. Once you had done that, you could go to code Xcode, and 
hypothetically, tell the Xcode debugger to attach to the debug RB app. That 
way, you could debug both your RB code, and your plugin, in the same session.

--
James Milne
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>