what is the best known method for debugging a recursive function ??
how do i make things print and make sense of things it is doing ?
any standard or generally used guidelines ?
If you want something pretty, you can use a static variable inside the function to count how many times you have recursed and place spaces to indent information for that call. Printing the parameters and possibly the value you are going to return may be useful as well.