Trace your function invokes in JavaScript
Some times you might encounter a problem when your function is called dozens of times, but you don’t have any idea why and where. Probably it is invoked somewhere in deeply nested child component you couldn’t even expect. In this case a solution might be console.trace()
. It will produce a full stack trace of every function invoke.