How can I get 'clean' output in the xCode console?

Hi all,

For specific reasons I need to debug on the xCode console. I can get this to work, but there are thousands of lines spewing and I can hardly find my own print statements in there.

Is there a way to filter this so I only see my own print("") statement’s output, or at the least just what I see in the Corona Console?


Just search for the name of your game and select library from the pull-down menu next to it.

1 Like

Thanks! That was exactly what I needed!

I’ve created my own command, zprint that also allows me to filter what I want to see.

example: zprint(“A”,“Print this to the console”)

function zprint(whatToPrint,textToPrint.)
   local listToPrint="Asm". --A=main subroutine announcement, s=sound code, m=music code, etc...
 if string.find(listToPrint, whatToPrint,1,true) then
   print("||||"..alphaNumberPrintCategory.."|"..tostring(textToPrint), ...)


You will also notice that the print statement includes |||| at the start of every line. Accordingly, you can put the |||| into the console search and it will only show print statements from the zprint routine. I find this simple routine makes it easier to debug code specific to a particular function, too. Good luck!