Why to use?
1. Suppose we want to check any log message in our client side controller or helper method.
2. Suppose we want to check a client side controller or helper method is calling from a button click or not.
3. Suppose we want to check user request parameter(s) is coming properly or not to a client side controller or helper method.
4. Suppose we want to check server-side response.
How to develop?
In your controller or helper method use the below line of code,
console.log("Your condole log message.");
How to check?
Suppose we have a "Save" button in our lightning component and click on "Save" button will call a controller "doSave()" method.
Now we want to check is this method is calling or not? So, create a console.log("I am under doSave method.") under this doSave() method. Now open this component in browser and also open console window [For eg. to open console window in google chrome use "Ctrl + Shift + i "].
Now click on "Save" button and check console window and if every thing is OK, then we will see log message as "I am under doSave method." in console window.
1. Suppose we want to check any log message in our client side controller or helper method.
2. Suppose we want to check a client side controller or helper method is calling from a button click or not.
3. Suppose we want to check user request parameter(s) is coming properly or not to a client side controller or helper method.
4. Suppose we want to check server-side response.
How to develop?
In your controller or helper method use the below line of code,
console.log("Your condole log message.");
How to check?
Suppose we have a "Save" button in our lightning component and click on "Save" button will call a controller "doSave()" method.
Now we want to check is this method is calling or not? So, create a console.log("I am under doSave method.") under this doSave() method. Now open this component in browser and also open console window [For eg. to open console window in google chrome use "Ctrl + Shift + i "].
Now click on "Save" button and check console window and if every thing is OK, then we will see log message as "I am under doSave method." in console window.