调试器如何仅查看值而不查看变量的内存地址 [英] Debugger how to only see values not memory addresses of variables

查看:43
本文介绍了调试器如何仅查看值而不查看变量的内存地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我一直在Visual Studio中广泛地使用struct和class,其中大多数具有很多价值,因此在调试时它们很难在监视窗口中跟踪,因为监视窗口和浮动监视窗口(您可以固定的一个,不知道精确的术语)总是显示使值视图模糊的内存地址.有没有一种方法可以使监视窗口仅显示值,而不显示内存地址

As of late I have been working extensively with struct and classes in visual studio.Most of them have a lot of values witch makes them hard to track in the watch windows while debugging because the watch windows and the floating watch windows ( the one you can pin , dont know precise term ) always show the memory address which obscures the view of the values. Is there a way to make it so that the watch windows only show the values and not memory addresses

推荐答案

写自定义的natvis是一种解决方法.

Write the custom natvis would be a workaround.

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

But if the debugger knows the type of the memory location, I think it can display the value.

参考:

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

In addition, using format specifiers in watch window would be helpful for you to visit the value format:

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

这篇关于调试器如何仅查看值而不查看变量的内存地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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