Forums > Javascript

Print JS object for debugging?

May 29 2013 | 7:22 am

I’m working on a patch that reads and writes JSONs as project files and generally operates on JS objects. I’ve started heavily testing and am looking for a speedier alternative to my method of save to JSON, navigate to finder, double-click JSON, and review.

I’ve looked into the [shell] and [] objects to simply script in opening the JSON (and they seem generally useful), but [shell] seems to be unavailable and [] doesn’t seem to work properly with Max 6/Intel machines.

I also tried to simply print out the object in the Max window via "post("\n" + JSON.stringify(currentProject, null, 4));" but it seems to get cut-off in the Max window and doesn’t display the whole object when it’s of a considerable size (bug?).

Any help or alternatives would be greatly appreciated. I could write a function that parses out the object in chunks to workaround the apparent bug I’ve found but that seems hacky and could get me in trouble down the line as these objects grow.

thanks in advance,






Jun 28 2013 | 7:13 am

you can open JSON file inside DICT object to view it .

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

Forums > Javascript