Log a variable to the console using conditional breakpoints

Sometimes it's not possible for us to log data to the Console directly in the code. For example, when we debug codes coming from external libraries.
Perform the steps below to print the variable:
console.log('replace-it-with-your-variable');
When the associcate line is hit by the debug process, it will try to evaluate the condition meaning that the variable is printed out.
The nice thing is that the script execution on the page is still being processed because the condition never happens (the console.log function returns undefined).
In the following screenshot, the params variable is logged to the Console when the sum function is invoked.
Log with conditional breakpoints
Log with conditional breakpoints

See also