Reputation: 1728
For a demonstrating, take a look at the following section of this video.
Basically, I know this is possible in Visual Studio Community Edition 2015. I was wondering:
a) Is this related to Intellitrace and "Historic debugging"? b) Will there be any side-effect when I do this? Or is this just moving the instructions backwards and that's it?
Upvotes: 4
Views: 1747
Reputation: 685
It's been doable for a long while now. Everything that happened to the point from where you are dragging the cursor already happened, so you will essentially be re-doing that bit.
There are no REAL consequences, unless you are processing something or saving to database etc., as writing the same existing data might throw an exception or mess with processing of some data.
All of the variables that have been set (even if you drag the cursor higher than they initialize) will retain the value they had from the spot you've dragged the cursor upward.
Upvotes: 0
Reputation: 391734
It is just moving the instruction pointer backwards and that's it, to use your own words.
This means that:
So you can use this debugging aid to either force the program to take a path it didn't (for instance by dragging the instruction pointer inside an if-statement it skipped), to skip (by dragging the instruction pointer past some code you don't want to execute), or to rerun some code.
But you must be aware of the above limitations. If the code is not safe to be executed again, then doing so will likely not help you debug.
Upvotes: 3