I am a believer of the Root Cause Analysis. Ask "How, What, Why" until you can dissect it with no further to go. Well, I am a frontend developer ready for new challenges!
Trace will show the stack trace, where that fails.
Let’s say in your app you have like a function that calls another function, that calls another function.
If you add a trace in the last function and something happen, it will log exactly where happened, like:
function_3 at line 1 (example)
function_2 at line 5 (example)
function_1 at line 88 (example)
I'm a web developer and father from The Netherlands. I mostly do Frontend Web development, but I'm also known to dabble in PHP, MySQL and AWS. I'm interested in learning Vue and NodeJS.
Thanks for the article, console.trace() can be usefull sometimes.
Thanks!
True! I completely forgot about
console.trace()
, thanks for remind me!What does trace do?
Trace will show the stack trace, where that fails.
Let’s say in your app you have like a function that calls another function, that calls another function.
If you add a trace in the last function and something happen, it will log exactly where happened, like:
Oo! I like that one a lot. :)