Is it possible to determine the source information (file, line number, column number) of a callback in v8?
function foo(callback) {
var x = callback();
if (typeof x !== "string") {
//hmmm, x is not as expected, I want to know more about the callback.
}
}
I’m not aware that you can do this in JavaScript, but if you can debug it, it should show you the file/line etc..
I guess doing that would depend exactly on your setup and I’ve never done it myself – it looks like node (uses v8) has some sort of support for that .
Might be useful?: v8 DebuggerProtocol