Re: debugging twain plugin - host application
Re: debugging twain plugin - host application
- Subject: Re: debugging twain plugin - host application
- From: Jim Ingham <email@hidden>
- Date: Fri, 6 Aug 2004 14:14:03 -0700
On Aug 6, 2004, at 1:32 PM, Anders Bertelrud wrote:
Hello Keith,
Yes, Xcode fixes a couple of the issues. In particular, custom
executables are now edited in the Get Info panel, just as targets and
the project settings are. So the Get Info context menu (as well as
the menu item under File) should work.
I agree with you about the "Add to Project" popup; because we use the
same assistant panel regardless of whether you invoke the menu item
with or without a selection in the groups-and-files outline, that
popup is always there. That's of course a bit redundant if you
invoked it through the contextual menu.
As for launching CFM applications, I had trouble getting that to work
directly in Xcode 1.5. What I was able to do, however, is to use the
LaunchCFM command line tool to launch Photoshop. Here's what I did:
1) create a new custom executable
2) set the path of the executable to be
/System/Library/Frameworks/Carbon.framework/Versions/Current/Support/
LaunchCFMApp
3) set the first argument to be /Applications/Adobe\ Photoshop\
7/Adobe\ Photoshop\ 7.0/Contents/MacOS/Adobe\ Photoshop\ 7.0
Then I am able to launch Photoshop from within Xcode. This of course
assumes that you have Photoshop 7 -- adjust the path accordingly if
you have a different version.
Xcode should of course be able to launch CFM executables directly; I
have filed a bug report about that so that we can fix it in a future
release.
Note that Xcode is not entirely at fault here. Doing:
$ /Applications/Adobe\ Photoshop\ 7/Adobe\ Photoshop\
7.0/Contents/MacOS/Adobe\ Photoshop\ 7.0
on the Terminal will also not work. The OS doesn't directly exec CFM
apps, it requires LaunchCFMApp to do this. So though it would be great
for Xcode to hide this detail from you, you're still likely to bark
your shins against it somewhere else.
You also asked about attach. There isn't UI to get the list of running
processes yet, but you can do the rest pretty easily as follows:
Open the Executables editor for the executable you want to attach to.
Switch to the Debugging tab, and un-check "Start Executable after
starting debugger".
Start the debugger.
Use Terminal or the Activity Monitor to get the PID of your app.
Open the Console window (Debug->Console, or you can put a tool bar
button for it in your toolbar) and type:
(gdb) attach <PID>
Jim
Anders Bertelud
Xcode
Apple Computer, Inc.
On Aug 6, 2004, at 07.49, Keith Ray wrote:
Are any of these problems fixed in 1.5?
On Aug 5, 2004, at 11:55 AM, Keith Ray wrote:
I'm building a twain plugin and need to run Photoshop as my host
application.
So I found "Executables / Add / New Custom Executable", which brings
up an
Assistant that has a popup menu "Add to Project". Why is that there
-- I'm
already explicitly adding this to my project (which is the only
selection in the
popup menu)?
After adding this "executable" to the project, context menu "Get
Info"
doesn't work to edit it, but "Open in External Window" does.
More importantly, "Build and Debug" does a build and link (no
errors), but
doesn't launch Photoshop.
How can it get the xcode 1.2 debugger to attach to a running
application?
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.
--
C. Keith Ray
<http://homepage.mac.com/keithray/blog/index.html>
<http://homepage.mac.com/keithray/xpminifaq.html>
<http://homepage.mac.com/keithray/resume2.html>
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.