I'm interested in utilizing the callstack of a function call to create an accurate timeline when an exception is thrown. While I know that I can retrieve the name, caller name, line number, and file for each call from the callstack, I am wondering if it's possible to also obtain the timestamp for each called function.
function callA() {
callB();
}
function callB() {
callC();
}
function callC() {
throw new Error('Boom');
}
When checking the chrome console, it shows:
Uncaught Error: Boom
at callC (<anonymous>:13:8)
at callB (<anonymous>:8:2)
at callA (<anonymous>:3:2)
at <anonymous>:1:1
What I envision working with in my JavaScript code would be something like this:
Uncaught Error: Boom
at callC (<anonymous>:13:8) timestamp : 1559117311448
at callB (<anonymous>:8:2) timestamp : 1559117311449
at callA (<anonymous>:3:2) timestamp : 1559117311449
at <anonymous>:1:1