In visual studio, is there any way to step back to see what has been done a few lines before?

Is there a way in the visual studio to pull back to see what the previous few lines were like? I hit an unhandled exception in my code, and I would like to take a step back (without re-executing) so that I can see the class / method that called the method that threw the exception. This is in C #

+47
visual-studio-2008
Nov 17 '09 at 23:23
source share
4 answers
Debug -> Windows -> Call Stack (Ctrl + Alt + C is default bindings (I think)) 

Show you the execution history, you can double-click events to go to the definition, however you cannot return to the code

But you can drag your little yellow arrow to another point in the code to re-execute some code, again this will not change what is already done

+69
Nov 17 '09 at 23:28
source share

VS2010 should support historical debugging in which you can go back as you suggest. http://blogs.msdn.com/ianhu/archive/2009/05/13/historical-debugging-in-visual-studio-team-system-2010.aspx

Unfortunately, in VS2008 there is no way to do this.

+11
Nov 17 '09 at 23:35
source share

You just need to drag the small yellow arrow to any other point to re-execute the code you need.

Note. This will not change what has already been done.

+6
Jun 25 '14 at 1:47
source share

The last preview of Visual Studio (today: 2017-10-16) is "backing down"

https://www.visualstudio.com/vs/preview/

"Advanced debugging features such as indentation"

0
Oct. 16 '17 at 16:06 on
source share



All Articles