Say, I have a recursive code as below, where the variable 'resultshere' keeps getting updated in every recursive call. I would like to see the value of this variable from the "previous" call even for the brief period when it's not in current scope, and so does not have a value (yet).
How can I do this in eclipse?
Say my code is something like this:
public class Test {
public static void main(String[] args) {
System.out.println(fun(5));
}
static int fun(int n) {
int resultshere = 0;
int ret = 0;
if (n == 0) {
resultshere = 1;
return resultshere;
}
ret = fun(n - 1);
resultshere = n * ret;
return resultshere;
}
}

