In Visual Studio 2015 for C#, I debug a program. The debugger pauses somewhere and raises System.StackOverflowException
:
An unhandled exception of type 'System.StackOverflowException' occurred in mscorlib.dll
It means that there is infinite recursion going on.
I want to find out which method is initially called and then leads to the exception, so I turn to the Call Stack window, but there are so many stacks that the out-most stacks have been truncated off the Call Stack window:
...
The maximum number of stack frames supported by Visual Studio has been exceeded.
Is there some way to find out the out-most stacks when
System.StackOverflowException
happens?Is there some way to limit the maximum number of stack frames before
System.StackOverflowException
is raised, so that all the stack frames can be shown in the Call Stack window?
Thanks.