How To Debug A ScreenSaver on Mavericks with XCode 5

From Wurst-Wasser.net
Jump to navigation Jump to search

Why?

Until now, I installed the screensaver, launched System Preferences, chose the ScreenSaver and debugged it. There had to be a simpler way. And there is.

How?

The idea is to tell XCode to use the ScreenSaverEngine as executable and launch it with our built screensaver.

This is how you do it:

  1. Edit scheme
  2. Edit your Pre-Actions:

    cp -pr "$BUILT_PRODUCTS_DIR/$FULL_PRODUCT_NAME" "$INSTALL_PATH/"
  3. Edit Run Info:

    (choose ScreenSaverEngine located in /System/Library/FrameWorks/ScreenSaver.framework/Resources)
  4. Edit Run Arguments:
    [1]
  5. Hit ⌘-R

  • Links
  • Footnotes:
  1. For some reason, the build-variables can't be used here, if they could, I'd recommend this:
    -background -module "$FULL_PRODUCT_NAME"