How do you debug a script that - you've been told - is causing memory leaks?

A very important step in this is reproducing the problem. If this is a good defect (bug) report, then it will explain in detail what the user did to cause the problem and what they did to measure the problem.

Your first step is to make what the user saw happen, happen for you on your test system. Then once you can make it happen, try to make as short a case as possible that will make the problem happen as frequently as possible and as easily as possible.

I have worked on some problem reports full-time for a week to make the problem report into something that the Developer cannot ignore...Run program A and this causes problem X, measured by metric Y. Repeatability is a key step to figuring out a solution.