So can you suggest me a way to track function calls? I can't rally find my way around debugging, and really don't know where to start from breakpoints.
It is actually easy to debug and track javascript in google chrome . A quick google search will tell you more. Just hit CTRL + SHIFT + J to get developer options in google chrome. Then go to your call and execute the stepinto or stepover . You can use the stack trace option to help you. I stuck an idea for an idea.

The same thing can be done in firefox using firebug
EDIT
I tried, but I can not find a way around them. I tried to trace the line where a function is called that requires an Xhttp request, but no luck there.
To track AJAX calls, you need to add breakpoints to your callback functions; The callback function will receive the breakpoint called when they are called.
source share