How to display entire QString during debugging

I use Qtcreator and whenever I need to display a large string, it is cropped, see screenshot: enter image description here

Is there a way to show the whole QString? Please note that using the contents of Open view in the editor does not help either, it is there.

+6
source share
4 answers

In the section "Tools → Options → Debugger → (" Locales and Expressions "or" General "(depending on the version of your author) there is a parameter"), which limits the line length to 10,000 characters by default.

+8
source

This seems to be a limitation of the Qt Creator user interface, which shortens the displayed string length.

qDebug() << yourString; seems to work for me, I see the entire line in the application output panel :-)

+1
source

You are right, I tried on my machine a string with 150,000 characters, and it happened ... It seems that qDebug () has the same limitation. I would suggest you print your string to a file using, for example, the fstream file.

0
source

This is the best answer: fooobar.com/questions/16420588 / ...

"In Local and Expressions, right-click the variable and select" Change Value Display Format ", then in" Change Display "for the QString type, click" Single Window. "

0
source

Source: https://habr.com/ru/post/979316/


All Articles