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

查看:116
本文介绍了使用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:

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

Debug -> New Breakpoint -> New Data Breakpoint

输入:

&myVariable

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

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