Inspired by the amount of work those guys put into the project, I decided to publish my tiny contribution to the same landscape – QCConsole patch.
Tracing the execution of a program is one of the most established methods of debugging used by all sorts of programmers out there. Every Cocoa programmer is familiar with a bare-bones
NSLog() function or its functional offsprings.
Once I started experimenting with Quartz Composer, the very first obstacle I hit was the lack of a console-like window. Therefore, in order to trace or audit the composition behaviour, I was forced to use the “Instructions” patch. A simple solution, albeit a very limited one. You can only print a short line of text, there’s no timestamp and no way to dump a structure, etc.
To address this problem, I created QCConsole. It’s a custom patch that you can use in your composition in order to dump a value of anything that travels between QC’s patches. The received value will be printed out in a separate console window, instrumented with a timestamp, type, and other contextual data.
Installation and Usage
Download the plugin QCConsole.plugin and place it in the
"/Users/_[YOUR_USERNAME]_/Library/Graphics/Quartz Composer Patches/" folder (create the folder if it doesn’t already exist).
Restart Quartz Composer and voilà, you are now equipped with another tool – a “Print to Console” patch.
Add it to your composition and connect its input with any output you want. After you run your composition, the plugin will open the console window displaying all received values.
You can use as many patch instances as you need in your composition. All received data will be printed in the same console window.
Oh, one more thing – you can give your “Print to Console” patch a name to better describe the received data. This name will be visible in the console as well.
Time for the mandatory screencast: