问题
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