Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug print an object from jade

Tags:

node.js

pug

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

like image 459
Dudy Avatar asked Aug 15 '15 02:08

Dudy


People also ask

How to print an object to console in Java?

An object is created using class in java. When issue occurs during the development of a project, it is essential to print the java object to the console in order to examine the actual values for further debugging. By default, If you print an object using System.out.println or logger statements, It displays format packagename.classname@hashcode

How to apply debug print in Excel VBA?

For applying Debug Print in Excel VBA, we need to follow the below steps. Step 1: Go to the VBA window, under the Insert menu tab select Module as shown below. Step 2: In the newly opened Module, write the subcategory VBA Debug Print or you can choose any other name for that.

How do print Java object as JSON string in Jackson?

How do print java object as JSOn string. In this example, Convert java object into json string Jackson is an serialization and deserialization library to convert java object from / to JSOn object Jackson has ObjectMapper class which provides read and writing an json string from an javaobject.

What is the difference between MsgBox and debug print?

But there are some major difference and benefits of using Debug Print over MsgBox. Debug Print, shows us the value stored in any variable or in itself in Debug Print like MsgBox. It also helps in debugging the error after executing the complete code.


2 Answers

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

div
- console.log(the_object_you_want_to_log)
div
like image 105
Michael Recachinas Avatar answered Sep 16 '22 12:09

Michael Recachinas


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)})
like image 44
Ashok Regar Avatar answered Sep 18 '22 12:09

Ashok Regar