Last active
January 2, 2021 21:56
-
-
Save tbartelmess/8f3fd7913e625a52c7928da49336f347 to your computer and use it in GitHub Desktop.
Apple Script to Attach Xcode to a Process
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- Usage: osascript [PATH TO SCRIPT] pid | |
on run argv | |
tell application "System Events" | |
tell process "Xcode" | |
set frontmost to true | |
click menu item "Attach to Process by PID or Name…" of menu "Debug" of menu bar 1 | |
click first text field of sheet 1 of window 1 | |
keystroke item 1 of argv | |
click button "Attach" of sheet 1 of window 1 | |
end tell | |
end tell | |
end run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment