In a previous question I had asked about recursion one of the responses recommended that I use debugger mode to see the order of operations. I had a few more order of operations questions, but figured I should use the debugger to run it instead of asking silly questions each time.
I ran the application in "Debug As" -> "Java Application" in Eclipse, and it just runs the program in a normal console giving me the same result as if I were to run it.
This is the program in question(Just what I am using to test Debug, I don't have questions regarding this actual app):
public class main {
public static void main(String [] args){
System.out.println(fact(5));
}
public void fact()
{
fact(5);
}
public static int fact(int n)
{
if(n == 1){
return 1;
}
return n * (fact(n-1) + 5);
}
}
In Debug mode it just provided me with "1145", which is the same thing that the normal "Run" mode provides me.
I wanted to see the actual step by step instructions that are being fed into the JVM, which is what I gathered that Debug is supposed to do.
I read online instructions on how to Debug applications, and that tutorial had different options in Eclipse then mine, such as "toggle breakpoint", which I do not have in the most recent version of Eclipse.
Can someone please point me to a direction as to how to get Eclipse to show me step-by-step operations.