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?
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.
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!
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.
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.
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!