Unsolved How to trace the instructions of the code in Qt Creator
-
Hi all,
Using Visual Studio we could trace each line of the code in C++ to find out the source of a problem. Is these any possibility in Qt Creator please? -
Hi,
Do you mean the debugger ?
-
Hi,
Yes I think.
We would use the Debug tab of VS 2015, F11, F10 for step-over and step-into. -
Then you have to install the debugging tools provided from the Microsoft web site. Visual Studio comes with an "integrated debugger" that you can't use from the outside.
-
-
Thank you two.
Yes I use MinGW and F10 and F11 work but not as expected!
I can't trace the lines of code. :(
I have few functions in My_First_Calculator.cpp that I want to trace the code lines of one method of it but whenever I press F10 or F11 no lines will be traced. That is, it seems useless.
How do you trace your codes please? -
Silly question but are you using a debug build ?
-
@tomy So, you place a break point and start debugging with F5? And it does not stop at the breakpoint? Or it stops there but F10/11 does not work? Or what? Your description is unclear.
-
Sorry guys, I'm so new in Qt. I apologize for bothering.
I just when into the function I would want to trace its lines and the pressed F11 and F10 like these.
But apparently I should run the app using F5. Is it right? If so how to place a break point? I don't know this?
And will it this way be possible to see the values of variables e.g., chars, string, ints and etc? -
@tomy
to place a breakpoint, just click the left of editor's line number, it will show a red point.
and I think you can read official document about debug mode -
Yeah I think I found most of the things.
But another question: Is aQStringList
in Qt equivalent tostringstream
in C++? -
@tomy No. QStringList is a list of strings, same as QList<QString>.
http://doc.qt.io/qt-5.7/qtextstream.html -
@tomy
QStringList
is inherited fromQList<QString>
, it does not have relationship with stream.
read QStringList document for more information.
I'm not familiar withstringstream
, but maybe QTextStream is a choice.by the way, the question is not related to the topic