在Qt Creator中进行调试时,如何访问字符串变量的完整值? [英] How to access the complete value of string variables when debugging in qt creator?

查看:745
本文介绍了在Qt Creator中进行调试时,如何访问字符串变量的完整值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在调试我的c ++应用程序,并且我有一些可以包含2000个字符或更多字符的字符串变量.调试时,变量的值显示为不完整(以"..."结尾),而不是正确的值.同样,当我右键单击该变量并选择将当前值复制到剪贴板"时,该变量也将复制不完整.我认为这一定是非常基本的事情,但是我没有在qt creator中发现如何显示变量的实际完整内容?预先感谢.

I'm debugging my c++ application and I have some string variables which can have 2000 characters or more. When debugging, the variable's value is shown incomplete (ending with "...") instead of showing the correct value. Also when I right click the variable and select "Copy current VALUE to clipboard" it is also copied incomplete. I think this must be a very basic thing but I didn't found in qt creator how to show the actual complete content of the variable? Thanks in advance.

工具->调试器-> Locals&表达式我已经将最大字符串长度"和显示字符串长度"更改为大于10.000的值,但仍只显示500个字符.

In Tools -> debugger -> Locals & Expressions I've already changed the "maximum string length" and "display string length" to values above 10.000 but it is still only showing 500 characters.

推荐答案

Local and Expressions 中,右键单击变量,然后单击 Change Value Display Format ,然后在更改类型为QString的显示下,单击单独的窗口

In Local and Expressions, right click on the variable and click on Change Value Display Format, then under Change Display for type QString click on Separate Window

这篇关于在Qt Creator中进行调试时,如何访问字符串变量的完整值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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