You can trace a codes call-stack in the console easily by generating an error, like

console.log(Error('this is where it calls'))