13

Seeing this blew my mind:

CLion showing the type of variable in C++

But it would be really awesome if it actually showed me the value inside it. Is it possible to fix this?

Vadim Peretokin
  • 2,221
  • 3
  • 29
  • 40

3 Answers3

4

Not possible yet - but upvote the request on https://youtrack.jetbrains.com/issue/CPP-605 to get this traction.

Vadim Peretokin
  • 2,221
  • 3
  • 29
  • 40
2

I just added var.toStdString() in watchs.enter image description here

Guy Sadoun
  • 427
  • 6
  • 17
1

You can use gdb command in console:

print ((wchar_t*)((char *)str.d + str.d->offset))

or just add watch in "Variables":

((wchar_t*)((char *)str.d + str.d->offset))

Another way is use this project to add Qt pretty printer.

CyberDao
  • 11
  • 2