如何在Visual Studio的调试监视窗口中获取变量的全部内容 [英] How to get the entire content of a variable in the debug watch window of visual studio

查看:82
本文介绍了如何在Visual Studio的调试监视窗口中获取变量的全部内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我右键单击并复制,我只会得到一半的文字:

If i right click and copy i only get half text:

-       text    0x00000000000f20d0 L"_BinRun.IMAGE_DOS_HEADER := \"\t\tWORD   e_magic;\n\t\tWORD   e_cblp;\n\t\tWORD   e_cp;\n\t\tWORD   e_crlc;\n\t\tWORD   e_cparhdr;\n\t\tWORD   e_minalloc;\n\t\tWORD   e_maxalloc;\n\t\tWORD   e_ss;\n\t\tWORD   e_sp;\n\t\tWORD   e_c...  wchar_t *

试图以文字字符串的形式获取整个内容,包括 \" \ t \ t \ n \ 等.我在我的项目和vstudio2019中使用c ++.

Trying to get the entire content as a literal string including \"\t\t\n\ etc. Im using c++ in my project and vstudio2019.

推荐答案

您不能.该字符串太长,无法直接在调试器监视窗口中显示.通过单击变量右侧的放大镜来使用String Visualizer.这就是要,然后从那里复制它:

You can't. The string is too long to display directly in the debugger watch window. Use the String Visualizer by clicking the magnifying glass to the right of the variable. That's what it's for and then copy it from there:

(强调我的)

在Visual Studio中调试时,可以使用内置的字符串可视化器查看字符串.字符串可视化器显示的字符串对于数据提示或调试器窗口来说太长了.

这篇关于如何在Visual Studio的调试监视窗口中获取变量的全部内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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