making a debugging tool

Hi I am trying to make a debugging tool to help me check multiple variables at once. What I would like to do is this. Have the script ask for the object to test. Have the script ask for the script to test. Have the script ask for the variables to test.

and simply have it show all the values and names of those variables

Here's what I got thus far. Not sure how to get further. Thanks for all the help!

var objObject: Transform;
var sScriptName = "Script Name Here";

    class variable
    {
        var varName = "Variable Name Here"; 
    }
    var iNumberOfVar: int;
    var sVariableName: variable[];
    private var textMesh: TextMesh;
    private var temp: int = 0;

    function Start()
    {
        textMesh = GetComponent(TextMesh);  
    }

    function Update() 
    {
        if(iNumberOfVar == 0)
        {
            return; 
        }

        textMesh.text = "";
        for(temp = 0; temp < iNumberOfVar; temp++)
        {
            textMesh.text += sVariableName[temp];
            var script = objObject.GetComponent(sScriptName);
            //textMesh.text += " " + script.sVariablename[temp] + "
";// Stuck Here... Figure out later.
        }
    }

Google this: csharp reflection msdn Good luck

Use MonoDevelop it does what you are trying to code without coding it.