title: When Debugging in Visual Studio, how do I view the function call hierarchy/stack in the IDE?
body: <p>In VB.net, I am aware that you can use a stack trace to get the function call hierarchy that lead to an exception.</p>
  
  <p>However, I also know that if you are debugging and an exception is generated, you can view this information right in the IDE... (if you have the right version or settings?)</p>
  
  <p>Allow me to explain:</p>
  
  <p>Say I write a subroutine as follows:</p>
  
  <pre><code>Public Shared Sub DoSomethingFoolish()
      Dim x As integer = 0
      Dim y As integer = 1 / i 'can't do this
  End Sub
  </code></pre>
  
  <p>If I run this in debug mode, the when the bad line is executed, I will get an error, and the debugging will stop. The bad line will be highlighted, and I can view what the error was (divide by zero, in this case)</p>
  
  <p>This line would be highlighted:</p>
  
  <pre><code>Dim y As integer = 1 / i 'can't do this
  </code></pre>
  
  <p>(this is what I have currently)</p>
  
  <hr>
  
  <p>However, lets say I have 5 locations in my program where I make a call to DoSomethingFoolish().</p>
  
  <p>I know that there is a way that you can traverse your way up the call heirarchy.</p>
  
  <p>Ex, the call might have been made from here:</p>
  
  <pre><code>Public Shared Sub MaybeDoSomethingFoolish()
      If DareIActAFool = True Then
              DoSomethingFoolish()
      End If
  End Sub
  </code></pre>
  
  <p>And by traversing the heirarchy, I could what line in this subroutine caused the error, and it would be highlighted as well:</p>
  
  <pre><code>DoSomethingFoolish()
  </code></pre>
  
  <p>(I am not getting this information now, but I did on a previous install)</p>
  
  <hr>
  
  <p>From there, I could look at where MaybeDoSomethingFoolish() was called from, etc. until I reached a 'starting point' of sorts, ie a button click event or a form load event. (I am only looking for the call heirarchy / stack trace from the code I wrote.)</p>
  
  <hr>
  
  <p>I know there was a way to view this in the IDE, because I was able to do it a few weeks ago. I was recently upgraded to Windows 7 at my work machine. I am wondering why I lost this ability.</p>
  
  <p>Is it a setting that I can change somewhere?</p>
  
  <p>Was I given an inferior version of Visual Studio? (I have VS 2010 Professional now)</p>
  
  <hr>
  
  <p>I apologise if this is a stupid question, but when I tried searching the internet for an answer, all I found was a bunch of people talking about this thing:</p>
  
  <pre><code>Dim ST As New StackTrace()
  msgbox(ST.ToString())
  </code></pre>
  
  <p>which is not what I am looking for. I am probably using the wrong keywords.</p>
  
  <p>The debugging mode I am referring to allowed you to view basically the same information, but right in the IDE and it didn't require inserting any code, nor did it require me to read through the text in the stack trace information and navigate there manually in the source. It was point and click.</p>