vb.net添加监视停止时价值变动 [英] vb.net Add Watch stop when value changes

查看:147
本文介绍了vb.net添加监视停止时价值变动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道在旧版本的Visual Studio,有一个添加监视选项,在这里你可以选择停止执行时,字段的值发生变化。我使用VS 2010的,我想不出如何打断点时的磁场变化的值。

I know in the older versions of Visual Studio, there was an "Add Watch" option where you can choose to stop execution when the value of the field changed. I am using VS 2010, and I can't figure out how to hit the breakpoint when the value of the field changes.

任何想法?

推荐答案

数据断点是什么,我记得,你的描述相匹配。它使用的处理器的功能,它需要变量和大小的地址,在检测到写入存储器地址时处理器自动生成陷阱。很不错的调试工具。

Data breakpoints is what I remember, your description matches. It used a processor feature, it requires the address of the variable and the size, the processor automatically generates a trap when it detects a write to the memory address. Very nice debugging tool.

在管理code可悲的是不再可用,垃圾收集器弄乱它,因为它移动的物体左右,而压缩堆。从而改变他们的地址。垃圾收集器和调试器之间的接口不是强到足以允许调试器跟踪这些移动,同时压实正在发生在运行时。毫无疑问,以避免开销严重的金额。

Sadly no longer available in managed code, the garbage collector messes it up because it moves objects around while compacting the heap. Which changes their address. The interface between the garbage collector and the debugger isn't strong enough to allow the debugger to track these moves while the compacting is taking place at runtime. No doubt to avoid a serious amount of overhead.

你得到了下一个最好的事情是一个setter方法​​。您可以在其上设置一个断点。

The next best thing you got is a property setter. You can set a breakpoint on it.

这篇关于vb.net添加监视停止时价值变动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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