Spawn a screen session from launch daemon
I've written a launchd .plist which should attach a debugger to the WindowServer when it launches. The main part of the script looks like screen -D -m -S "WindowServer Debugger" \ gdb \ -x $GDBSCRIPT \ /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/WindowServer \ $WSPID This starts a detached screen session in which gdb is attached to WindowServer. However, this seems to trigger an error condition in launchd under Snow Leopard, causing it to spout out error messages to the log: com.apple.launchd[1] (0x10011c070