You can always simply add an alert() prompt anywhere in a function. Especially useful for knowing if a function was called, if a function completed or where a function fails.
alert('start of function x');
alert('end of function y');
alert('about to call function a');
alert('returned from function b');
You get the idea.