Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dragging the instruction pointer backward while debugging in Visual Studio

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?

like image 685
anemaria20 Avatar asked Oct 28 '25 04:10

anemaria20


1 Answers

It is just moving the instruction pointer backwards and that's it, to use your own words.

This means that:

  • Any side-effects already incurred between where you drag it to and where you dragged it from has already incurred and won't be reversed.
  • Any variables changed in the same section of instructions will still be changed, they are not reversed to whatever values they had at the point you you drag the instruction pointer to

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.

like image 177
Lasse V. Karlsen Avatar answered Oct 29 '25 18:10

Lasse V. Karlsen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!