A common Maya debug for any mel script in All of Maya is the mel whatIs command. It basically tells you the location of any sourced script on your computers file system. It's a great way to melSteal and figure out what a script is doing.
for mel you just use whatIs and the name of the command
// Result: Script found in: C:/Program Files/Autodesk/Maya2015/scripts/startup/buildDisplayMenu.mel //
// Result: Command //
if the command is not a script, but an internal maya command it will return "command".
Then you can use the help or help -doc to look up that command in the maya help reference.
In python the equivalent to mel whatIs is to envoke its __file__ command.
so if not already imported. use the python import command
and then run it's __file__
and it should return the scripts file path