问题:
So what I'm looking for here is something like PHP's print_r function. 所以我在这里寻找的是类似PHP的print_r函数。 This is so I can debug my scripts by seeing what's the state of the object in question. 这样一来,我可以通过查看问题对象的状态来调试脚本。
解决方案:
参考一: https://stackoom.com/question/nyX/是否有内置功能可以打印对象的所有当前属性和值参考二: https://oldbug.net/q/nyX/Is-there-a-built-in-function-to-print-all-the-current-properties-and-values-of-an-object
来源:oschina
链接:https://my.oschina.net/u/4428122/blog/4320549