本文介绍了在Visual Studio中如何获取变量写入的断点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
这是可以在Visual Studio中设置变量变化的断点(我认为这是写访问)在Visual Studio中被称为数据断点。要创建一个,您需要将该变量的地址(只需添加& variableName
)添加到手表或即时窗口中。然后执行以下
- 调试 - >新断点 - >新数据断点
- 输入地址in和size的大小字节值
注意:这仅适用于C ++应用程序。托管语言不支持数据断点。
How I can set breakpoint on variable change (I think this is write access) in Visual Studio?
解决方案
This is referred to as a Data Breakpoint in Visual Studio. To create one you'll need the address of the variable in question (just add &variableName
) to the watch or immediate window. Then do the following
- Debug -> New Breakpoint -> New Data Breakpoint
- Enter the address in and size of the value in bytes
Note: This is only supported for C++ applications. Managed languages don't support data break points.
这篇关于在Visual Studio中如何获取变量写入的断点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!