DEV Community

Discussion on: Stop using default console.log, check this instead

 
guilhermetoti profile image
Guilherme Toti

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)