Quick view of objects in the Rhino shell (equivalent to PHP var_dump?)

Is there a better way to debug in Rhino than print this every time?

for (prop in obj) { print("obj[" + prop + "] = " + obj[prop]); };

Update. To be clear, my question is whether there are existing standard methods / modules / tricks in this thread.

+3
source share
2 answers

obj.toSource() will be performed for basic inspection.

+4
source

For

obj.toSource() 

it seems like a strange case when it is not displayed, for example:

var v = [];
v['love'] = 'amore';    
print(v.toSource());

while your source code (you can wrap it in int dump () works.

+1
source

Source: https://habr.com/ru/post/1745048/


All Articles