Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug a Screensaver in OS X

Tags:

I was wondering if there was any decent way, other than NSLog-ing just about everything - to properly debug a Screensaver app bundle in OS X?

The "Screensaver" is a project type in Xcode, but there's obviously no Build and Go debugging. Further, I've found that in fact my bundle is getting loaded in to the

/System/Library/Frameworks/ScreenSaver.framework/Versions/A/Resources/ScreenSaverEngine.app  

application as some sort of plugin.

So is there a decent way to debug your code? Looking at crash reports and NSLog-ing to the console helps, but it's far from perfect.

like image 751
Dave Martorana Avatar asked Jul 09 '09 05:07

Dave Martorana


1 Answers

There is an old MacTech article that describes the Screen Saver development cycle. There is also a Part 2 to the article. Look in the "Debugging Tips" section.

I find this method a pain so I wrote an application, the basic application was one window and a controller that initialized a ScreenSaverView with my new screensaver bundle. Once that was working all I had to do to test a change was hit Command-R in Xcode.

like image 64
Mark Avatar answered Sep 19 '22 15:09

Mark