c++ - 调试器如何只看到值而不是变量的内存地址

标签 c++ visual-studio debugging

最近我一直在 visual studio 中广泛使用结构和类。它们中的大多数都有很多值,这使得它们很难在调试时在监 window 口中跟踪,因为监 window 口和 float 监 window 口(一个你可以固定的,不知道确切的术语)总是显示模糊值 View 的内存地址。有没有办法让监 window 口只显示值而不显示内存地址

最佳答案

编写自定义 natvis 是一种解决方法。

但如果调试器知道内存位置的类型,我认为它可以显示该值。

引用:

Is it possible to watch the value of a memory location using the Visual Studio Debugger's Watch window?

此外,在监 window 口中使用格式说明符将有助于您访问值格式:

https://msdn.microsoft.com/en-us/library/75w45ekt.aspx

关于c++ - 调试器如何只看到值而不是变量的内存地址,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41221735/

相关文章:

c++ - 使用 doxygen 记录枚举值

c++ - 我的问题是关于在 tm_year 中使用 -1900

asp.net - 如何在 Visual Studio 中添加 NUnit

在 Windows 上使用 WebStorm+Chrome 调试 Angularjs2+npm

c# - 是否有一些调试工具可以在平面表格中显示结果

c++ - '? ?' is getting converted into ' ^' 在 Visual C++ 中。为什么会发生,出路在哪里?

c# - 如何只查看 Resharper 中的公共(public)方法?

c# - 删除代码时有什么方法不会出现 Designer 错误? (C#、Visual Studio、WinForms)

debugging - 所选调试器的 ABI 与工具链 ABI 不匹配

C++ 循环 header 依赖