tharunkumar
tharunkumar

Reputation: 2911

Qt debug - how to watch the value of the variable in Qt Cpp

Is there any way to check the value of the variable in Qt while debugging [other than calling the printf() or qDebug() function] ?

Upvotes: 1

Views: 6019

Answers (4)

totem_motorist
totem_motorist

Reputation: 157

Proceed to go Debug->Add Expression Evaluator and the right side show a pane, right click and select again, "Add Expression Evaluator" option that prompt to write some expression or variable name( I use QT Creator 4.4.12)

Upvotes: 0

Phadadev
Phadadev

Reputation: 376

It's work for me.

qDebug("myVariable : %u " ,myVariable);

Upvotes: 0

jonezq
jonezq

Reputation: 354

You could use IDE(as example: QtCreator for Linux, VS for Win or even console) with integrated GDB (or other debugging tool), and set "breakpoint".

Upvotes: 2

usamazf
usamazf

Reputation: 3215

As per my understanding yes there is a way of seeing values of variables by hovering the mouse over the variables. For this you need to Enable the following option in the debugger option pane:

Option-->Debuger-->General-->"Use tooltips in main editor while debugging"

Upvotes: 5

Related Questions