Click to the left of any line number to set a breakpoint (red dot), then click Run: the program pauses there. Step advances line by line; Step over avoids stepping into functions; Step out finishes the current call. The Call stack displays active invocations of fact(), and the Watch table updates variable values after every step.
C (on the server):
#include <stdio.h>
int fact(int n)
{
if (n <= 1) {
return 1;
}
return n * fact(n - 1);
}
int main(void)
{
int n = 4;
int f = fact(n);
printf("%d! = %d\n", n, f);
return 0;
}
Python (in the browser):
def fact(n):
if n <= 1:
return 1
return n * fact(n - 1)
n = 4
f = fact(n)
print(f"{n}! = {f}")