在Visual Studio中调试时向后拖动指令指针 [英] Dragging the instruction pointer backward while debugging in Visual Studio

查看:105
本文介绍了在Visual Studio中调试时向后拖动指令指针的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

要进行演示,请查看以下内容此视频的一部分

基本上,我知道这在Visual Studio Community Edition 2015中是可能的。我想知道:

Basically, I know this is possible in Visual Studio Community Edition 2015. I was wondering:

a)这与Intellitrace和历史调试有关吗?
b)当我这样做时会有副作用吗?还是这只是向后移动指令?

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?

推荐答案

只是向后移动指令指针,仅此而已。

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

这意味着:


  • 任何副作用

  • 在指令的同一部分中更改的任何变量仍会更改,它们会在您将其拖动到的位置与从其中拖动的位置之间已经发生。

  • 不会反转到您将指令指针拖到点时的任何值

因此您可以使用此调试辅助工具强制程序采用它没有的路径(例如,通过将指令指针拖动到已跳过的if语句内),跳过(通过将指令指针拖动到您不想执行的某些代码上)或重新运行一些代码。

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.

这篇关于在Visual Studio中调试时向后拖动指令指针的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆