[TxMt] Help with command to set debug points in XCode.

Scott Andrew scottandrew at adelphia.net
Mon Sep 18 15:07:06 UTC 2006


I have been working on the following script to set breakpoint is  
XCode. I am not a Ruby expert and I am sure I am doing something  
wrong. Any help would be appreciated.

Currenly my script looks like so:

proect = %x{"#{ENV['TM_BUNDLE_SUPPORT']}/bin/find_xcode_project.rb"}
named = File.basename(proect)
xCodeProject = named.sub(/\.(xcodeproj|xcode|pbproj)\/?$/, "")
breakLine = #{ENV['TM_LINE_NUMBER']}

print xCodeProject

astring = "osascript -e \'tell application \"TextMate\"
	set myName to name of front document
end tell
tell application \"Xcode\"
	tell project named \"#{xCodeProject}\"\r\n
        	set bp to make new file breakpoint
		set file reference of bp to file reference named myName
		set enabled of bp to true
	end tell
end tell\'"

print astring

%x{#{astring}}

My output is:

iPhoto2PBase
osascript -e 'tell application "TextMate"
	set myName to name of front document
end tell
tell application "Xcode"
	tell project named "HelloWorld
"

        	set bp to make new file breakpoint
		set file reference of bp to file reference named myName
		set enabled of bp to true
	end tell
end tell'

For some reason i have a bunch of white space after my project's name.

Also how do i put { and } into a string so they are printable?



More information about the textmate mailing list