Cheat Sheet - Debugging: Console - Log
Cheat Sheet - Debugging: Console - Log
Cheat Sheet - Debugging: Console - Log
Console.log
A very quick and easy way to start with debugging is by using console.log().
Whilst this doesnt replace real debugging, it makes it easy to see if some
variables are set as expected, certain parts in the code are reached or
which status/ value a certain property has at a certain place during code
execution.
It may be used like this:
let myExampleVariable = 123;
console.log(myExampleVariable);
Note, that console.log may not only log variables but also objects or arrays.
Augury
Augury (https://github.com/rangle/augury) is a Chrome extension you may
install. It allows you to not only dig into your code (as with sourcemaps)
but instead to get a more understandable representation of your
components, their state etc. Definitely check out the official
documentation to learn more about it!