Here is some code that worked for me (sorry it is Objective-C rather than standard C as per your code above):
consoleLog("My debug message");
Note that I have tried to define a vararg version (log taking multiple parameters) but I couldn't get this to work correctly across the framework api.
Update to answer:
console.log("My debug message");