From-'FAIL'-to-'PASS'%3A-How-to-Debug-and-Improve-Your-AI-Agent's-Performance