How to see stack before stack overflow?

I have a StackOverflowException that occurs deep inside the LINQ DataContext when calling SubmitChanges . After you spent a lot of time trying to determine where the overflow occurs, I cannot figure it out.

How can I see what the stack looked like, just before the stack overflows?

+4
source share
1 answer

You cannot catch a StackOverflowException unless it is specified by user code. (more details)

  • In the visual studio, from the Debug menu, select "New Breakpoint> Function Break ..."
  • In the Function box of the New Breakpoint dialog box, enter StackOverflowException.StackOverflowException
  • Run the program in the debugger. Once you get a stack overflow, the debugger stops at the breakpoint.
+3
source

Source: https://habr.com/ru/post/1400433/


All Articles