Common Chrome Debug Tools Overview
Yong Liang
Posted on July 31, 2019
Debugger
Debugger allows us to set break points to force the code executions at a certain point. Once the program hits the break point and stops the execution, we can then examine the javascript values.
Console.log()
console.log() method displays a message to the console. The content of the message depends on what we pass to the console.log() method. For example, passing console.log("testing") will write "testing" to the console. We can pass objects, arrays, any type of data to console.log() and check their values.
Console.dir()
The console.dir() method displays all the properties of an object in a list manner and allows us to see the content of the child objects.
Console.table()
The console.table() method displays datas in a table format. The first argument is mandatory, which can be an array or object. The second optional argument specifies the number of columns the table should display.
Posted on July 31, 2019
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
November 30, 2024