Visual Studio:打破变量变化? [英] Visual Studio: Break on variable change?

查看:132
本文介绍了Visual Studio:打破变量变化?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在C ++类中有一个成员变量struct我在Visual Studio 2008 Professional中进行调试。我想在结构改变的任何时候打破。是否可以这样做,或者我必须在代码中寻找可能改变的每个可能的点,并在那里设置断点?

I have a member variable struct in a C++ class I'm debugging in Visual Studio 2008 Professional. I would like to break any time the struct changes. Is it possible to do this, or must I look for every possible point in the code it could change, and set breakpoints there?

推荐答案

如果您可以确定成员的地址,可以在其上设置数据断点:

If you can determine the address of the member, you can set a data breakpoint on it:

https://msdn.microsoft.com/en-us/library/5557y8b4.aspx#BKMK_Set_a_data_change_breakpoint__native_C___only_

这篇关于Visual Studio:打破变量变化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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