Logging Max Window (console) to file

Mar 20, 2009 at 5:54pm

Logging Max Window (console) to file

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?

#42944
Mar 20, 2009 at 11:21pm

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.

#153825
Mar 23, 2009 at 6:57am

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!

#153826
May 4, 2010 at 12:00am

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.

#153827
May 5, 2010 at 4:54pm

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.

#153828
May 5, 2010 at 8:40pm

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!

#153829

You must be logged in to reply to this topic.