Viewing CallStack in Visual Studio 2010 when stack overflow exception thrown

I want to view the call stack when a stackoverflow exception is thrown. (i.e. I want to pin point what recursive call is causing the stack overflow). The call stack is cleared and all that I can see is "External Code".

Edit I followed Chris Schmich's advice (post below), now I have a call stack like below, this is just a plain console app that I'm writing, notice that the is no mention of Main() in the screen shot:

alt text

Edit2: I followed Chris Schmich's advice about view the different threads call stacks, however I still can't seem to view my console app's call stack, here's what I can see:

alt text


The [External Code] frame you see is because of the debugger's Just My Code feature. The debugger is hiding stack frames from you because they are not in your code. Some details about JMC can be found in this blog post.

You can disable Just My Code by doing the following:

  • Debug » Options and Settings... » uncheck "Enable Just My Code (Managed only)" » click OK

You should now be able to see all of the stack frames.

For an example of JMC, when I step into a simple C# console app with JMC enabled, I see only the code in my solution...

alt text

...and with JMC disabled, I see Framework code as well...

alt text