Debugging scripting
Hello there!
I am trying to find a good workflow or set of commands to debug objects in lens studio. I went through some of the debugging tutorials offered and found the print() function however, it does not work well with objects or object properties as it only evaluates for strings. Does anyone have a good way to inspect the javascript objects to determine properties?
Thanks so much!
-Phill
Phill,
I'd be interested in better solutions but I created a scene traversal script. Place this script somewhere in the object hierarchy. In the logging window copy the output and paste it into a code editor.
https://gist.github.com/robertlugg/a5161200998092ddf69cb7393f7efcc0
Feedback and improvements very much appreciated.
I may modify it later to break out the inherited properties.
Thanks Robert! Thats super helpful! I'll play with your script. I've been getting by also doing a "print(JSON.stringify())", but of course it doesn't do everything!