I usually put alot of echoes in my code when I'm testing, which I know would still be alot of work if the script is large, but at least you can have it echo anything unique so you know where it is. Just a suggestion.