使用 Visual Studio 调试器更改值时中断 [英] Break when a value changes using the Visual Studio debugger

查看:27
本文介绍了使用 Visual Studio 调试器更改值时中断的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在变量上放置监视,并且只有在该值发生变化时 Visual Studio 才会中断?

Is there a way to place a watch on variable and only have Visual Studio break when that value changes?

这样可以更轻松地找到棘手的状态问题.

It would make it so much easier to find tricky state issues.

这能做到吗?

断点条件仍然需要设置断点,我宁愿设置监视并让 Visual Studio 在状态更改时设置断点.

Breakpoint conditions still need a breakpoint set, and I'd rather set a watch and let Visual Studio set the breakpoints at state changes.

推荐答案

在 Visual Studio 2005 菜单中:

In the Visual Studio 2005 menu:

调试 -> 新断点 -> 新数据断点

输入:

&myVariable

这篇关于使用 Visual Studio 调试器更改值时中断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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