So, I’ve not come across any useful tool, like VisualStudio, that has an interactive callstack. Next best thing? This function from PHP: debug_print_traceback.
Give it a go. Besides just a bunch of echo/die statements, you might want to use debug_print_traceback to help identify from where a common function is called.