V
V
Vladislav Olegovich2020-03-05 08:59:07
Qt
Vladislav Olegovich, 2020-03-05 08:59:07

How to debug on source code, not disassembler in Qt Creator on linux?

I wanted to debug the code from the source code, as in Visual Studio, but in Qt Creator, debugging proceeds automatically from the disassembled code, I did not find the necessary option in the settings.5e609510287da203424761.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
res2001, 2020-03-05
@res2001

It is necessary to collect the code with debugging information. For gcc switch -g in compiler options.
As far as I remember, in the pro file you need to set:
BUILD_FLAG=debug
Then qmake will include debugging information when building. I could be wrong, I haven't used Qt and qmake for a long time.
If the point shown is not your code, but is located, for example, inside the library that your code uses, then you need to build this library with debugging information. But in this case, most of the time the error is in your code anyway, so it might not be necessary.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question