How to debug print an object from jade

两盒软妹~` 提交于 2020-01-02 03:31:37

问题


How to debug print an object from jade,Like console.log() in javascript


回答1:


You can debug with console.log from jade like this:

div
- console.log(the_object_you_want_to_log)
div



回答2:


This helped me! Able to see whole tree of Object in console.

Start script. from leftmost and just give space or tab according to your template before console.log.

script.
  console.log(!{JSON.stringify(Object)})



回答3:


You can debug like this

div
   = your_debug_data
div

or formatted style like:

code.formattedDebug #{your_debug_data}


来源:https://stackoverflow.com/questions/32021040/how-to-debug-print-an-object-from-jade

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!