• 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: How can I set the active executable with AppleScript?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can I set the active executable with AppleScript?


  • Subject: Re: How can I set the active executable with AppleScript?
  • From: Robert Purves <email@hidden>
  • Date: Fri, 15 Feb 2008 23:55:46 +1300


I wrote:
I am using the technique described here
<http://developer.apple.com/documentation/DeveloperTools/Conceptual/XcodeUserGuide/Contents/Resources/en.lproj/06_02_db_set_up_debug/chapter_42_section_6.html >
to debug numerous arbitrary applications in Xcode.
The technique works well, but it is laborious to set the active executable manually.
This attempt to automate the setup with AppleScript
< inept code snipped >

gives: Xcode got an error: Can’t set active executable to "/path/to/ MyTest.app".



Thanks to Stefan Haller, who supplied the arcane code for setting the active executable. Below is my (now working) AppleScript and the shell script that calls it.


-- DebugWithXcode.scpt
on run argv
set pathToDebugProject to item 1 of argv
set nameOfDebugProject to item 2 of argv
set pathToAppUnderTest to item 3 of argv
tell application "Xcode"
open pathToDebugProject
tell project nameOfDebugProject
set e to executables whose path is pathToAppUnderTest
if length of e is 0 then
set e to make new executable with properties {name:"dbug", path:pathToAppUnderTest}
else
set e to first item of e
end if
set active executable to e
debug
end tell
end tell
end run


#! /bin/sh
osascript DebugWithXcode.scpt /path/to/DebugHost.xcodeproj DebugHost / path/to/Test.app &


Robert P.


_______________________________________________ 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
References: 
 >How can I set the active executable with AppleScript? (From: Robert Purves <email@hidden>)
 >Re: How can I set the active executable with AppleScript? (From: Philip Aker <email@hidden>)

  • Prev by Date: Re: NSMatrix connections
  • Next by Date: Re: PyObjc Terminating app due to uncaught exception
  • Previous by thread: Re: How can I set the active executable with AppleScript?
  • Next by thread: Re: How can I set the active executable with AppleScript?
  • Index(es):
    • Date
    • Thread