Forums > Dev

Logging Max Window (console) to file

March 20, 2009 | 5:54 pm

How do you log the console/Max window to a file?

I’m writing an external and it crashes Max whenever I run it. I want to use print statements to debug when the external is causing it to crash.

Or is there a smarter way to debug it?

March 20, 2009 | 11:21 pm

You can debug your object with the Runtime and your favorite IDE. You might also use cpost() method which works like post() except that it send the string to the Console instead of the Max window.

March 23, 2009 | 6:57 am

cpost() doesn’t work, it’s not recognized as a function; is there a library I need to include?

I’m using Xcode on Mac. I tried copying the Max MSP runtime into my build/Development/ directory, and selecting that as the runtime for my executable. However, as I debug it, I get this error:

JUCE v1.45. no interfaces folder, you are in serious trouble!

May 4, 2010 | 12:00 am

Is there a way to log the console/Max window to a file? I’m not debugging an external, but I’m building a Max For Live-device which uses the csound~-object. It would be really helpful to get a log-file from the Max window for debugging purposes. I’ve tried to use the -OFILE/–logfile=FILE-console statements in the csound-message, but it doesn’t seems like Csound is picking it up.

May 5, 2010 | 4:54 pm

There is a message to Max "setmirrortoconsole" which will mirror Max window output to the console. You could then launch Max from the command line and redirect the output to a file if you like.

May 5, 2010 | 8:40 pm

I actually tried that message a couple of days ago, but couldn’t get it to work it seemed. Worked when I tried it now though. It solves the problem with debugging, but I have to use the console-app since it’s a Max For Live-device and therefor cannot run Max from the command line. Would have been nice to have a log-file, but I guess using the console-app works just fine :)

Thanks anyways Timothy!

Viewing 6 posts - 1 through 6 (of 6 total)

Forums > Dev