How can I reproduce method behavior offline and debug

Viewed 38

I have C# code that runs on the remote machine, I would like to reproduce the method operation in debug mode, for example:

public static class calc
{
    public static int addingSum = 0;
    public static int subSum = 0;
    public static List<int> aList = new List<int>();
    public static List<int> bList = new List<int>();
    public static void dummyMethod(int a, int b)
    {
        this.addingSum += a + b;
        this.subSum += a - b;
        this.aList.add(a);
        this.bList.add(b);
    }
}

I would like to record how this method is behaving in runtime on remote machine and reproduce it later in my local machine with debugger I did it before by serialize the all objects/variable and mock it using unit test, my question is if there is any simpler way?

Thanks

0 Answers
Related